[Mimedefang] Patch to Add Spamd Support

Richard Laager rlaager at wiktel.com
Tue Jun 17 13:46:01 EDT 2003


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

David F. Skoll wrote:
> On Mon, 16 Jun 2003, Richard Laager wrote:

> That's not correct; spam_assassin_check uses one copy of SpamAssassin
> per slave, not per message.

Has it always been this way? I could swear the last time I looked at the
code it was loading one copy per message. I could be just plain wrong
though.

> Well, then you should start a fixed number of slaves and keep them
> running :-).  Also, you can increase the maximum number of
> requests/slave to a high number like 5000 so you don't pay the startup
> penalty very often.

I've done both of these things already. The big change was pre-compiling
the SpamAssassin code *outside* of the filter_XXX functions.

> I'll look over the patch and consider it.  But I need hard 
> numbers showing
> a performance improvement, because I doubt it really helps.  
> It introduces
> yet another socket over which the message has to be 
> transmitted.  Although
> it may save some memory during idle time, I need convincing that it
> improves performance.

Very true. I did some more testing. Performance wise it's close, but the
spamd_ functions are a little slower because of the added socket. Then
again, in our situation, we have plenty of CPU power to spare, but we're
running close on memory.

Performance wise, perhaps its then better to stick to the Perl only
SpamAssassin. The major flaw that's killing our setup is that the
SpamAssassin process is initialized with the first message scanned rather
than with the slave. Even if all the slaves are pre-loaded when a burst of
messages comes in, the chain reaction can still start.

Finally, I haven't gotten the auto-whitelist to work with MIMEDefang's
default spam_assassin_ functions. I ended up initializing SpamAssassin
myself so that I could call set_persistent_address_list_factory with a
Mail::SpamAssassin::DBBasedAddrList that I also created.

Richard Laager


-----BEGIN PGP SIGNATURE-----
Version: 6.5.8ckt http://www.ipgpp.com/

iQA/AwUBPu9TXm31OrleHxvOEQKhIQCeNjfQU4LNoDFvjXwtBYfKD5W33BsAn2GP
BMJDVlUy1I+vkcLQ1To1hGoQ
=NZAH
-----END PGP SIGNATURE-----




More information about the MIMEDefang mailing list