[Mimedefang] Patch to Add Spamd Support

David F. Skoll dfs at roaringpenguin.com
Tue Jun 17 14:27:01 EDT 2003


On Tue, 17 Jun 2003, Richard Laager wrote:

> Has it always been this way?

Yup; since way back.

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

That's an interesting idea.  This could be done by adding the following
code to the filter (outside any routine)

spam_assassin_init()->compile_now(0) if defined(spam_assassin_init());

> 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.

But spamd forks for each message, doesn't it?  I guess you do save
some memory because more memory can be shared, but I'd be interested to
see memory usage while spamd is chewing through a burst of messages.

On the other hand, a well-tuned MD setup will not fork at all per
message.  Forks are amortized over MX_MAX_REQUESTS.

> 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.

Right.  If your mail server isn't doing anything else, you might want
to set the minimum number of slaves quite high, so everything's hot
and ready to go when a burst comes in.

> Finally, I haven't gotten the auto-whitelist to work with MIMEDefang's
> default spam_assassin_ functions.

They don't work easily with MD.  You have to do your own initialization,
as you suggested.

If people think the spamc/spamd patch is worth including, I'll add it.
However, I find it a bit inelegant to have two ways of doing the same
thing, especially when (according to one of your earlier posts) it's
difficult to get both the list of tests and the spam report out of
spamd.

Regards,

David.



More information about the MIMEDefang mailing list