[Mimedefang] Re: A place to skip tests (Questions on filter_recipient with multiple recip's)
David F. Skoll
dfs at roaringpenguin.com
Wed Apr 9 12:55:01 EDT 2003
Hi, Kelson.
> IIRC, filter_relay, filter_recipient, and filter_sender are all run before
> filter_begin, and filter_recipient runs as the relay names each recipient,
> not after they've all been listed, correct? So filter_recipient has no
> idea how many recipients there are.
That's correct.
> So: If I get a message sent to two people, one of whom I want to skip
> filtering, I need to use stream_by_recipient. However, that can't be
> called until *after* filter_recipient has run. This means that the
> original message with both recipients will trip the logic in
> filter_recipient, and filtering will stop before it even gets to
> stream_by_recipient.
Right.
> Is there someplace else where something similar to
> ACCEPT_AND_NO_MORE_FILTERING can be used?
Not really. All you can do is have your filter_begin, filter,
filter_multipart and filter_end routines do nothing if there is a
single recipient who is opted-out of scanning.
Returning the equivalent of ACCEPT_AND_NO_MORE_FILTERING from filter_begin()
would not save significant CPU load, because by then, the MIME message has
already been parsed and split into parts.
Regards,
David.
More information about the MIMEDefang
mailing list