Hello,

At present my Postfix is configured to do virus and spam filtering on all E-Mails it receives, whether for local delivery or relay. My goal is to scrub the E-Mails only on local delivery; I don't want any virus or spam filtering on relay. Here is how I am currently scrubbing all E-Mails, via master.cf:

smtp      inet  n       -       n       -       -       smtpd
 -o content_filter=mycustomfilter

("mycustomfilter" is defined elsewhere in master.cf; it calls a script that scrubs the E-Mail and then invokes "/usr/sbin/sendmail". I can supply details if needed, but the script does its job reliably, so I don't imagine its innards will be of consequence.)

Now, how do I get Postfix to send the E-Mail without scrubbing if it's being relayed? I assume I would want to configure this via the "relay" and "local" lines in master.cf; but thus far it's not working -- the "smtp" line apparently takes precedence and there is no evidence that "relay" or "local" is being visited.

smtp      inet  n       -       n       -       -       smtpd
relay     unix  -       -       n       -       -       smtpd
local     unix  -       n       n       -       -       smtpd
 -o content_filter=mycustomfilter

Clearly I'm doing something wrong; tips or clues? What conditions are required to hit the "relay" or "local" handlers, or am I going about it all wrong?

Reply via email to