On 8/27/2012 2:03 PM, Juerg Reimann wrote:
> Hello everybody,
> 
> Please excuse my probably rather novice question but I couldn't find any hint 
> on this. The document at http://www.postfix.org/SMTPD_PROXY_README.html says 
> it should be possible to reject an email with a before-queue content filter 
> ... but how would I exactly accomplish this?
> 
> What I want to do is reject what spamassassin considers spam (ok, I know the 
> cons, but I really want to do it this way), so what I have in my master.cf is:
> 
> smtp      inet  n       -       n       -       -       smtpd
>   -o content_filter=spamfilter:dummy
> spamfilter unix -       n       n       -       -       pipe
>   flags=Rq user=spamfilter argv=/.../spamfilter -f ${sender} -- ${recipient}


This is what postfix refers to as a "simple content filter", and
cannot be used as a before-queue filter.
http://www.postfix.org/FILTER_README.html#simple_filter

To use spamassassin in a before-queue filter, SA will need to be
called either from a milter, or from an "advanced content filter"
that speaks SMTP.


amavisd-new is frequently recommended as a reliable and flexible
advanced content filter that is suitable for use as an
smtpd_proxy_filter.

spamass-milter is frequently recommended as a simple milter for
spamassassin integration.

Although the setup and protocol of smtpd_proxy_filter vs. milter is
very different, overall system load/efficiency is largely the same,
making the choice mostly a feature set of a particular product.



  -- Noel Jones

Reply via email to