[H-GEN] Postfix, etc., and spam filtering
joel at gimps-r-us.com
Mon Jul 6 20:27:25 EDT 2009
Greg Black wrote:
> Asking a question here worked for Gaz, so maybe it will work for
> me too ...
> 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.
> Alternatively, if you know for a fact that some other MTA has
> such a capability, I'd appreciate its name and the same hint
> about where to read the FM.
Exim can do this.
Point acl_smtp_data to a defined ACL, and you can do a few interesting
things using Exim's built-in ACLs. Additionally, if you apply the
exiscan patch set (included with Exim >= 4.50), you can run SpamAssassin
against the email at the end of the data phase, before actually
accepting the message for delivery.
There is some sample configuration for acl_smtp_data in Exim's default
configuration file, but it can get a lot more complex than what is
presented. See section 41 in the Exim manual for an entire chapter on
making Exim do what you want it to do.
Yes, it is possible to make your mail server say "550 go away spammer"
at the end of DATA. Mine does, and it waits for 2 minutes before
telling them that too :-)
The exiscan patch set also does the same thing for virus scanning too,
allowing you to reject viruses with "550 you are a virus"
If you (or anyone else on the list) are interested, I am currently in
the process of setting up a business to sell and support an installation
of a UNIX variant, with Exim configured in this very way (along with a
few other things). Send me an email off-list if you want to know more.
> I'm really hoping somebody can point me to such a thing, as my
> only other option is write an MTA, and that would be a boring
> and tedious effort.
More information about the General