[H-GEN] Postfix, etc., and spam filtering
Menno
menno at freshfoo.com
Tue Jul 7 08:02:38 EDT 2009
Greg Black wrote:
> Last time I checked, Postfix did not offer a mechanism to scan
> incoming messages with an external spam filter during the SMTP
> conversation (i.e., at the end of the DATA phase), but only at
> subsequent phases (i.e., after having accepted the message in
> the SMTP conversation).
>
> If you know for a fact that this glaring weakness has been
> corrected, I would greatly appreciate a gentle (or not so
> gentle, as you prefer) nudge in the direction of the relevant
> part of the relevant FM.
Postfix can do this. See the following:
http://www.postfix.org/SMTPD_PROXY_README.html
http://www.postfix.org/MILTER_README.html
and for a higher level overview:
http://www.postfix.org/CONTENT_INSPECTION_README.html
These approaches require some effort on your part.
For the smtpd proxy approach you'll need a simple server that can talk
SMTP in a basic way and call the spam filter. This server returns an
SMTP error code to indicate that the incoming message should be
rejected. This is reasonably easy to whip up in Python (I've done it,
but the code is commercial).
The Milter approach requires that you write some glue to call the
external spam filter. Milter apps can be written in a variety of languages.
HTH...
Menno
More information about the General
mailing list