HOWTO: Adding extra rulesets to SpamAssassin

Desai, Jason jase at sensis.com
Mon Jul 9 21:57:54 IST 2007


You may also wish to 

rm -f /etc/mail/spamassassin/tripwire.cf

Jase 

> -----Original Message-----
> From: mailscanner-bounces at lists.mailscanner.info 
> [mailto:mailscanner-bounces at lists.mailscanner.info] On Behalf 
> Of Julian Field
> Sent: Sunday, July 08, 2007 3:13 PM
> To: MailScanner discussion
> Subject: HOWTO: Adding extra rulesets to SpamAssassin
> 
> I thought I would write this up as a little HOWTO on using the 
> SpamAssassin-recommended approach without having to use 
> RulesDuJour at all.
> 
> Firstly disable RulesDuJour
>     chmod -x /etc/cron/daily/rules_du_jour_wrapper
> Now it won't run every night.
> 
> Next, delete all the rulesets downloaded by RulesDuJour, as 
> we're going 
> to use sa-update to get them instead. We don't want 2 copies of the 
> rulesets.
>     rm -f /etc/mail/spamassassin/*sare*cf
>     rm -rf /etc/mail/spamassassin/RulesDuJour
> 
> Create a file for your list of SpamAssassin 'channels' including the 
> default set. Attached is a file to drop into 
> /etc/mail/spamassassin/jkf-channel-list.txt. Note that this is my 
> *personal* set of SARE rules that I use on my servers. I 
> strongly advise 
> you go to www.rulesemporium.com and read the descriptions of all the 
> rulesets and adapt the file to your own personal requirements.
> 
> Next we need to add a PGP key to SpamAssassin's update 
> method. This is a 
> condensed version of 
> http://daryl.dostech.ca/sa-update/sare/sare-sa-update-howto.txt.
>     wget http://daryl.dostech.ca/sa-update/sare/GPG.KEY
>     sa-update --import GPG.KEY
> 
> Next we need to add some command-line arguments to the call 
> to sa-update.
> 
> If you are using MailScanner 4.62.2 or later (which I'm just about to 
> publish) then edit /etc/sysconfig/MailScanner and edit the 
> definition of 
> SAUPDATEARGS to say
> SAUPDATEARGS="-D --channelfile 
> /etc/mail/spamassassin/jkf-channel-list.txt --gpgkey 856AA88A"
> (That should all be on one line of course)
> Once you are happy everything is working, remove the "-D" and it will 
> run a lot more quietly.
> 
> If you are using MailScanner 4.62.1 or earlier, then edit 
> /etc/cron.daily/sa-update and/or /etc/cron.daily/update_spamassassin 
> and/or /usr/sbin/update_spamassassin to make sure the call to 
> $SAUPDATE 
> says this:
> $SAUPDATE -D --channelfile 
> /etc/mail/spamassassin/jkf-channel-list.txt 
> --gpgkey 856AA88A
> (That should all be on one line of course)
> Once you are happy everything is working, remove the "-D" and it will 
> run a lot more quietly.
> 
> That concludes the main bit of this.
> 
> However, there is one extra ruleset which you might like to try. I've 
> got it going and it appears to work pretty well. Attached to this 
> message is a file KAM.cf.sh which you should put into 
> /etc/cron.daily/KAM.cf.sh and make it executable:
>     chmod +x /etc/cron.daily/KAM.cf.sh
> Run it once to get the initial copy of the ruleset file. It 
> will keep a 
> backup copy of the KAM.cf ruleset in KAM.cf.backup, which it 
> will use if 
> it can't download KAM.cf correctly later.
> 
> That's about it.
> I hope this improves the effectiveness of your spam checking.
> 
> Jules
> 
> -- 
> Julian Field MEng CITP
> www.MailScanner.info
> Buy the MailScanner book at www.MailScanner.info/store
> 
> MailScanner customisation, or any advanced system administration help?
> Contact me at Jules at Jules.FM
> 
> PGP footprint: EE81 D763 3DB0 0BFD E1DC 7222 11F6 5947 1415 B654
> For all your IT requirements visit www.transtec.co.uk
> 
> 


More information about the MailScanner mailing list