[Mimedefang] filter_recipient

Les Mikesell les at futuresource.com
Wed Jul 5 14:20:25 EDT 2006


On Wed, 2006-07-05 at 19:35 +0200, Harry Otten wrote:

> 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. 

Is this also an outbound relay for any of the primary domains?  If
so, what happens when an internal user sends to an address at
a secondary domain?

> 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.

I thought if you failed all the recipients either the sender would
quit on its own or DATA would be rejected.  Are you sure this doesn't
already happen?

-- 
  Les Mikesell
   lesmikesell at gmail.com





More information about the MIMEDefang mailing list