[Mimedefang] filter_recipient

Harry Otten hotten at 12solveIT.nl
Wed Jul 5 13:35:33 EDT 2006


Hello,

I have a mail server which runs some primary domains and some secondary
domains. 
When mail comes in for which he is the secondary mail server he should
tempfail if and only if the primary server is still running. 

Nagios checks the primary server and puts the state in a database.
I currently made the script using the filter_end with @recipients and
accessing that database. Works nice, but I want to reject the messages
before the data block to safe bandwidth. 

To do so I must use the filter_recipient routine.
The filter_recipient is called after every RCPT TO. 

So I need to keep track of my state. Did I see a valid e-mail address? Than
the mail may pass, whatever other recipients there may be. If no valid
e-mail address appeared the e-mail should be rejected. But how do I know if
I'm called for the last recipient? 

That's my problem. 

When all the recipients are done the sending mail server issues the DATA
instruction. At this point I want to do filtering. 
Instead of end your email with a dot we might temp fail.

Does mimedefang support this? No, does the sendmail milter? Are there other
ways of getting this done?

Thanks, and feedback is appreciated. 

Cheers,
Harry





More information about the MIMEDefang mailing list