On 6/10/2014 5:45 PM, Jay G. Scott wrote: > > After trying various combinations of things in > main.cf and master.cf, I find that, using the script > below, if the mail reaches the filter script, the > resulting mail message bounces (too many hops) > but the filter has processed the input. > > If I turn content_filter off in main.cf the > mail gets delivered unfiltered, no bounces, no hops. > > main.cf: > > content_filter = filter > > got it filtered, but resulted in the hops bounce. > > What am I missing? > > j.
Near the bottom of http://www.postfix.org/FILTER_README.html#simple_filter the document describes how to turn on filtering for mail arriving via SMTP, but leave it turned off as the main.cf default so mail won't loop. Of course this means you would need to submit mail via SMTP for testing; mail submitted via the sendmail(1) interface is not filtered. This is necessary since the "simple" filter resubmits the mail to postfix via the sendmail command. -- Noel Jones