Rejecting SPAM at SMTP time

Charles Steinkuehler charles at steinkuehler.net
Fri Jul 11 16:35:06 CDT 2003


I'm building a new mail server and have a question for anyone on the 
list who's familiar with Postfix (I'm most familiar with Exim and Qmail, 
but am going to try to use Postfix since RedHat packages and maintains 
it with their recent distributions).

I want to reject various "undesired" messages AT SMTP TIME (before the 
message is accepted for local delivery), rather than accepting the mail 
for delivery and then bouncing it (or sending it to /dev/null, etc). 
For the purposes of this discussion, "undesired mail" will be identified 
either by source IP (ie: RBL lists) or a content filter (ie: 
SpamAssassin, virus scanner, etc).

Reading through the Postfix documentation, supporting RBL lists doesn't 
seem like a problem, but I'm not sure if I can setup any external 
content checks to run before the mail is accepted (ie after the data 
phase of an smtp transaction, but before the MTA returns a 2xx OK).

In Exim, I can use the acl_smtp_data ACL list, which runs after the DATA 
phase completes, or the local_scan function to reject mail before it is 
accepted for delivery.

With Qmail, I can reject mail based on content by downloading one of the 
many patched versions of the mail recieving process, and/or hacking in 
my own code.

Is something similar possible with Postfix (preferrably without writing 
my own code)?

-- 
Charles Steinkuehler
charles at steinkuehler.net




More information about the Kclug mailing list