Using Spamd rather than the SpamAssassin Library
Matt Hampton
spamlists at coders.co.uk
Fri Sep 5 21:18:39 IST 2008
All
Don't know if anyone is interested but I have a (heavily) modified
SA.pm which allows MailScanner to use spamd rather than the
Mail::SpamAssassin library (similiar to how Rick(?) implemented the
calmd vs ClamAVModule). I have checked with Jules and he is happy with
me sharing it.
$Id: SA.pm 4522 2008-08-20 15:19:23Z sysjkf $
Instructions:
THINK CAREFULLY!
Once this patch is in place MailScanner relies solely on spamd - you
cannot choose between the two.
This is beta code and it uses a file from the SVN repository of
SpamAssassin which hasn't be published yet!
Download http://www.coders.co.uk/SA.pm
take a backup of the files
SA.pm
ConfigDefs.pl
in the MailScanner installation (on mine /usr/lib/MailScanner/MailScanner)
copy the downloaded file over the top of the existing file
add the following three lines to the bottom ConfigDefs.pl
spamdserv
spamdport
spamduser <USER>
(where <USER> is the default user for spamd)
The defaults for spamdserv/spamdport are "localhost" and port 783
YOU MUST REPLACE <USER> with a valid user!
Locate you Mail::SpamAssassin::Client.pm
Over write this with
http://svn.apache.org/viewvc/spamassassin/trunk/lib/Mail/SpamAssassin/Client.pm?revision=597826
This is a drop in replacement and does not change the functionality - it
exposes some extra bits and pieces.
Why would you want to do this?
Memory - Small over head as the SpamAssassin rules are loaded in to
shared memory
Faster - in theory it should be faster - haven't noticed a difference
The biggy.....: If you were to put in your MailScanner.conf file
Spamd User = &SomeFunction
You can now control the user that talks to the spamd.
This gives you:
Individual bayes
Individual awl
Individual scores
Need I say more.....
enjoy and feed back please. If enough people like it (especially
Jules!), I believe that retaining the ability to chose between the two
is possible.
matt
More information about the MailScanner
mailing list