On 06/17/2013 11:56 AM, Ashay Chitnis wrote:
Hi All,

I wanted to differentiate the incoming emails depending on whether they are generated by same server postfix

Mail can be submitted locally in several ways; smtp is usually not the most prevalent way. sendmail(1) submission is not subject to any of the smtpd_*_restrictions tests, so this is hard to implement there.

You could set up a second postfix instance and relay all sendmail-submitted email through that, but this does not make for a particularly manageable system as there will be a lot of duplication of effort.

(e.g. NDR)

Why do you want bounces to be handled separately ?
I suspect a scheme to not send bounces.
This is a Bad Idea; you should always send (valid) bounces.

If you wish to not send bounces for mail you accepted, don't accept the mail to begin with.
Proper configuration of smtpd_*_restrictions is key.

You may also want to consider not allowing user sendmail(1) submission at all (it is usally required for system-generated mail); instead, use the standard submission mechanism for all locally-submitted mail.

or being delivered to it by some smtp client. Is there a easy way to relay all mails generated through postfix to a different custom transport rule while saving the general emails coming though other smtp clients which will use the general rules on postfix.

If you require valid (i.e. postfix-controlled) sender addresses on submission, then you can use sender_dependent_default_transport_maps for this purpose.
If you don't, there really is no sane way to enforce this.


We use postfix 2.9 for our systems.


That has all of the above functionality.


--
J.

Reply via email to