[Mimedefang] Re: A place to skip tests (Questions on filter_recipient with multiple recip's)

Kelson Vibber kelson at speed.net
Mon Apr 7 13:58:01 EDT 2003

Marcelo Souza wrote:
>         Where is the best place to put a routine to skip MD tests based on
>a custom recipient list file?

I've been considering something similar.  Right now we skip SpamAssassin 
filtering for local senders, which we just do in filter_end with the SA 
checks, and something similar could be done based on recipient.

Recently I've seen some of our spamtraps are getting hit with lots of 
simultaneous spam, taking up all available MD slaves.  I want to keep 
auto-reporting the spam to Razor and Pyzor, so I don't want to take out the 
exceptions to our blacklists.  That leaves getting MD finished as fast as 
possible for these recipients, leaving me with the same issue you have.

What I'm looking at right now is using filter_recipient with the 

The only problem is, the man page for mimedefang-filter isn't clear on what 
filter_recipient does if there are multiple recipients and each generates a 
different return code.

If one recipient results in CONTINUE and another results in REJECT, I would 
assume the message would be delivered, but only to the recipient who 
returned CONTINUE.

* What happens if one recipient causes filter_recipient to return 
ACCEPT_AND_NO_MORE_FILTERING and another causes it to return 
CONTINUE?  Does MD split the message, does it take the first/last action 
requested, or does it just kick everything back to sendmail the moment it 
sees an ACCEPT... code?

* Am I correct in assuming that stream_by_recipient can't be used until 
filter_begin, but that it can be used selectively (i.e. checking the 
relaying IP first to only stream incoming mail and not outgoing)?

Kelson Vibber
SpeedGate Communications <www.speed.net> 

More information about the MIMEDefang mailing list