[Mimedefang] Patch to Add Spamd Support

Richard Laager rlaager at wiktel.com
Mon Jun 16 18:17:03 EDT 2003


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

Attached is a patch which adds spamd support to MIMEDefang. Spamd is a
daemonized version of SpamAssassin. The documentation is also updated by
this patch to reflect the code changes.

The main advantage to using spamd vs. the strictly Perl version of
SpamAssassin (the default of MIMEDefang) is that one copy of SpamAssassin
per machine can be shared. This eliminates the extra overhead of loading
one copy of SpamAssassin per message that comes in (which is how
spam_assassin_check) operates. It's even better than precaching one copy of
SpamAssassin per slave (which I hand-coded before using SpamAssassin's
compile_now feature).

In addition, spamd can run on a separate machine, or even a cluster.

The statistics I gathered on our servers is as follows:

MIMEDefang w/ Cached, Precompiled SpamAssassin: 25M per slave
MIMEDefang w/o SpamAssassin (or using spamd):   18M per slave
Spamd:                                          21M per server

So, if you run 3 slaves and spamd, it's the same amount of memory as
running 3 slaves with a cached, precompiled copy of SpamAssassin per slave.
However, if you run more than 3 slaves, the spamd setup will use less
memory.

Also, keep in mind that the startup penalty for loading all the
SpamAssassin rules is only incurred once with spamd, instead of once per
slave startup with a cached, precompiled version of spamassassin, or once
per message with spam_assassin_check().

With the volume of mail our servers handle, we were finding that the
startup CPU usage of compiling SpamAssassin on a per-slave basis was so
high that unless we setup the machine to start a fixed number of slaves and
keep them running, a sudden blast of spam would create a chain reaction
that would bring the server to its knees and cause all of the messages to
timeout (and be tempfailed). Obviously, when we were initializing a copy of
SpamAssassin per-message, it was much much worse!

Richard Laager

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

iQA/AwUBPu5BsG31OrleHxvOEQL4WQCeMrYoVo6+gfIhRxgYf6QjLO9CEnoAnROs
IzJIiFXfrLETwuYEEKRxS+/N
=Thvz
-----END PGP SIGNATURE-----
-------------- next part --------------
A non-text attachment was scrubbed...
Name: spamd.patch
Type: application/octet-stream
Size: 6590 bytes
Desc: not available
URL: <https://lists.mimedefang.org/pipermail/mimedefang_lists.mimedefang.org/attachments/20030616/063b6faa/attachment.obj>


More information about the MIMEDefang mailing list