Where to call SpamAssassin (was Re: [Mimedefang] quarantined message forwarded)

David F. Skoll dfs at roaringpenguin.com
Sun Aug 10 22:23:01 EDT 2003


On Sun, 10 Aug 2003, James Ralston wrote:

> FWIW, I disagree with the example mimedefang-filter configuration
> file; namely, I think it makes more sense to call SpamAssassin from
> filter_begin instead of filter_end.  That way, you can be certain that
> SpamAssassin operates on the message as it was received, not on the
> message as possibly modified by any of the filter or filter_multipart
> subroutines.

That is the case no matter where you call SpamAssassin.  Message
modifications do not actually happen until mimedefang.pl has done its
stuff and returned control back to the C milter code.  All of the
"action_*" functions merely make a little note for the C back-end to
do something.  They don't actually edit INPUTMSG in-place.

It is better (IMO) to call SpamAssassin from filter_end, because then you
can avoid calling it if the messages is being rejected for some other
reason (eg a bad filename in one of the parts.)  Calling SpamAssassin
is far and away the most expensive part of MIMEDefang, and avoiding it
if possible is very desirable.

--
David.



More information about the MIMEDefang mailing list