[Mimedefang] filter_recipient

Harry Otten hotten at 12solveIT.nl
Wed Jul 5 14:32:02 EDT 2006


> Van: Michael Lang [mailto:michi+mimedefang at relay3.jackal-net.at] 
> 
> Quoting Harry Otten <hotten at 12solveit.nl>:
> 
> > 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.
> 
> are you sure you want to depend a check on something that 
> might look different from other locations ? (upstream 
> problems, ISP peering troubles ...) another one, do you check 
> for 'complete' deliver ? (disk full, Virusscanner down, all 4xx ..)
> 

I made a smart plugin for nagios that sends out a e-mail to the mailserver.
The mailserver relay this e-mail back to the nagios machine. 

So diskfull, viruscanner down, link down etc is covered by this check. 

> >
> > 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.
> 
> you're mixing two checks:
>   * is the primary Server online ? (yes = goaway || send userlist )
>   * valid recipients for the Domain
> 

The problem is the mailserver also accepts some local e-mail. (like the
response for the nagios client)
So i need to see the list of recipients.

> why do you want to depend on the recipient list for your state ?
> but the part i think you are looking for is in manpage for 
> mimedefang-filter look for stream_by_recipient
> 
> 

I'm going to check out stream by recipient.

> Kind regards
> Michael Lang 

Thanks for your advice.

Cheers,
Harry
 




More information about the MIMEDefang mailing list