Adding And Updating SpamAssassin Rulesets With RulesDuJour
|
Submitted by falko (Contact Author) (Forums) on Wed, 2007-11-21 11:24. :: Anti-Spam/Virus | Linux | Security
Adding And Updating SpamAssassin Rulesets With RulesDuJourVersion 1.0 This article explains how you can download additional SpamAssassin rulesets resp. automatically update these rulesets with a shell script called RulesDuJour. These additional rulesets can increase your spam recognition rate dramatically. Most of the rulesets that RulesDuJour supports can be found on the SA Rules Emporium web site. I do not issue any guarantee that this will work for you!
1 Preliminary NoteI assume that you have already set up SpamAssassin (it doesn't matter if it's a standalone daemon or called through some other daemon such as amavisd - RulesDuJour supports all these configurations).
2 Downloading RulesDuJourI'd like to store the RulesDuJour script in the /usr/local/sbin directory, so I go there and download the script: cd /usr/local/sbin
3 Configuring RulesDuJourWhenever the RulesDuJour script is called, it tries to read the configuration file /etc/rulesdujour/config. Therefore we create that file now: mkdir /etc/rulesdujour
The TRUSTED_RULESETS line contains all rulesets that you want to use (make sure you test these before using them on production systems!); I've listed all available rulesets in a comment at the end of the line. The SA_DIR line must contain your SpamAssassin configuration directory; usually that's /etc/mail/spamassassin. The MAIL_ADDRESS should contain an email address to which you want RulesDuJour sent notifications about the download/update process. All other options are explained (as comments) in the above script. The SA_RESTART should be the command that is used to restart SpamAssassin. If you run SpamAssassin as a standalone daemon, it's probably something like /etc/init.d/spamassassin restart or /etc/init.d/spamd restart; if SpamAssassin is called through amavisd, you must specify the command used to restart amavisd (e.g. /etc/init.d/amavisd restart). It's a good idea to use full paths to all programs in the above script (e.g. /usr/bin/spamassassin instead of spamassassin or /usr/bin/curl instead of curl). You can find out the full path of each program with which, e.g. which spamassassin [root@server1 sbin]# which spamassassin
4 Running RulesDuJourIf you are in the /usr/local/sbin directory, you can run RulesDuJour like this: ./rules_du_jour In an other directory you can call it like this: rules_du_jour Of course, you can always use the full path as well: /usr/local/sbin/rules_du_jour
5 Creating A Cron JobOf course, you don't want to run RulesDuJour manually each time; therefore we set up a cron job like this: crontab -e
The above cron job would run RulesDuJour each night at 3:00h.
6 Links
|
www.seamlessenterprise.com
One number. One voicemail. Seize the lead. Sprint Mobile Integration.
www.seamlessenterprise.com
One Number. One Voicemail.
Make it easier for clients to reach you. Turn your desk phone and mobile phone into one with Sprint Mobile Integration.
www.seamlessenterprise.com
One number. One voicemail. Sprint Mobile Integration.
www.seamlessenterprise.com
AT&T Synaptic Compute as a Service. Boost your power on demand.
Trial: IBM Cognos Express Reporting, Analysis & Planning
Learn benefits of Simpana software.
View the Gartner Video







Recent comments
8 hours 15 min ago
8 hours 27 min ago
12 hours 10 min ago
12 hours 12 min ago
12 hours 15 min ago
13 hours 59 min ago
21 hours 40 min ago
22 hours 7 min ago
1 day 8 hours ago
1 day 8 hours ago