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
|
Join the discussion.
www.seamlessenterprise.com
IP Convergence
Integrate your wireless and wireline networks.
Learn how from the experts at Sprint.
www.seamlessenterprise.com
Wireless & Wireline Integration
Thoughts, strategies and solutions: join the discussion
www.seamlessenterprise.com
Unified Communications 2009
Join the Discussion. Now.
www.seamlessenterprise.com







Recent comments
16 hours 37 min ago
18 hours 6 min ago
21 hours 40 min ago
1 day 33 min ago
1 day 3 hours ago
1 day 4 hours ago
1 day 4 hours ago
1 day 5 hours ago
1 day 6 hours ago
1 day 7 hours ago