Hi
I would like to use RulesDuJour to update my SARE rules, but I was not able to find any howto which is using the new version. I only find not working links...
Can someone send me a working link to an instruction?
Michael
Hi
I would like to use RulesDuJour to update my SARE rules, but I was not able to find any howto which is using the new version. I only find not working links...
Can someone send me a working link to an instruction?
Michael
I thought one had been posted on here. Not sure where I got mine.
Download the rules_du_jour script and place it somewhere in your path
wget http://sandgnat.com/rdj/rules_du_jour
mv rules_du_jour /usr/local/sbin
chmod 700 /usr/local/sbin/rules_du_jour
Now create a blank configuration
mkdir /etc/rulesdujour
touch /etc/rulesdujour/config
Edit the /etc/rulesdujour/config file with your favorite editor and add:
You can add or take away rulesets that you wish. Obviously change <your e-mail address> to your e-mail address.Code:TRUSTED_RULESETS="TRIPWIRE SARE_ADULT SARE_OBFU0 SARE_OBFU1 SARE_URI0 SARE_URI1 SARE_STOCKS" SA_DIR="/etc/mail/spamassassin" MAIL_ADDRESS="<your e-mail address>" SA_RESTART="/scripts/restartsrv_spamd"
That's it, now run rules_du_jour or /usr/local/sbin/rules_du_jour. One thing to be careful about, you should only run rules_du_jour once per day. I believe rulesemporium.com has measures in place that will block your IP if you make more than one download request per day or something like that.
You'd probably be better off looking into sa-update since RulesDuJour has been deprecated (for some months now) in favour of it.
It's very simply to do, just create a shell script called sa-update.sh and add the lines:
Then run it daily via cron.Code:#!/bin/sh /usr/bin/sa-update /usr/bin/sa-update --nogpg --channel saupdates.openprotect.com
Jonathan Michaelson
Need your cPanel servers secured and tuned?
cPanel Server Configuration, Security, Recovery and Antivirus/AntiSpam Services
Developers of the most effective (and free) Firewall & Security Solution for cPanel Servers - csf
http://www.configserver.com
Thanks for the both solution. Chirpy, in this solution will it update all the installed rules, or where can I configure which rules should be checked and updated?
Michael
Chirpy, I just tried your script, but there is no output and after I run it I did not find any updates rules in /etc/mail/spamassassin.
Michael
It doesn't show output if it works. You can find the rule sets it downloads and spamassassin uses in /var/lib/spamassassin/ - what I gave you above provides you with the very latest rules from spamassassin themselves (the first sa-update) and the second one provides the latest recommended rules from SARE.
Jonathan Michaelson
Need your cPanel servers secured and tuned?
cPanel Server Configuration, Security, Recovery and Antivirus/AntiSpam Services
Developers of the most effective (and free) Firewall & Security Solution for cPanel Servers - csf
http://www.configserver.com
v3 of SpamAssassin automatically looks in /var/lib/spamassassin/ for rules. It's v3 that provides the sa-update procedure itself. It's nothing to do with cPanel
You can see this if you run sa-update and then do a:
spamassassin --lint -D
At the start of the output you should see it importing the downloaded rules from /var/lib/spamassassin/
Jonathan Michaelson
Need your cPanel servers secured and tuned?
cPanel Server Configuration, Security, Recovery and Antivirus/AntiSpam Services
Developers of the most effective (and free) Firewall & Security Solution for cPanel Servers - csf
http://www.configserver.com
chirpy,
shouldn't the updates be applied into the /etc/mail/spamassasssin or /usr/share/spamassassin/ folders with Cpanel?
As there is nothing in the /var/lib/spamassassin/ folder location on 3 of the Cpanel servers we use. The folder is there but not spamassassin type files are in this location. Does the SA w/Cpanel also look into this folder location along with the others listed above ??
So your saying, that using the Rules DuJour is a waste of time now and should be used ??
Mickalo
Thunder Rain Internet Publishing
Providing Internet Solutions that work!
Custom Perl and Database Programming
Ok, I see this now. I just ran the update on one of our less used servers and it does read from that folder ... interesting
Now should the sa-update be used in conjunction with the Rules DuJour or simply replace it and not use the Rules DuJour updates??
Now what are these other folder used for, the /etc/mail/spamassassin and /usr/share/spamassassin ? I was to understand that the /usr/share/spamassassin was the default folder used by SA ?
Mickalo
Thunder Rain Internet Publishing
Providing Internet Solutions that work!
Custom Perl and Database Programming
There's no need for RulesDuJour if you're using sa-update, especially as I've suggested above.
/usr/share/spamassassin/ is the local for the default installation of SA
/etc/mail/spamassassin/ is where you should put yur own local SA configuration settings for server-wide rules - if you currently have SARE rulesets in here you should remove them
/var/lib/spamassassin/ is used for dynamically updated rules from sa-update which contains both updates to the default SA rules plus the recommended selection of SARE rules
Jonathan Michaelson
Need your cPanel servers secured and tuned?
cPanel Server Configuration, Security, Recovery and Antivirus/AntiSpam Services
Developers of the most effective (and free) Firewall & Security Solution for cPanel Servers - csf
http://www.configserver.com
thx's Chirpy for the info, very helpful.
I did notice now, when you run the sa-update, you end up with alot of duplicate files in the /var/lib/spamassassin and /usr/share/spamassassin folders. Is this OK or should they be removed from one of the folders?
Can the sa-updates be applied to the /usr/share/spamassassin folder(with the --updatedir option) without causing problems ... or is that not recommended?
Mickalo
Thunder Rain Internet Publishing
Providing Internet Solutions that work!
Custom Perl and Database Programming
Great, thanks, now it's working well. Is there a need to restart spamassassin after the rules are downloaded?
Michael
Jonathan Michaelson
Need your cPanel servers secured and tuned?
cPanel Server Configuration, Security, Recovery and Antivirus/AntiSpam Services
Developers of the most effective (and free) Firewall & Security Solution for cPanel Servers - csf
http://www.configserver.com
Thunder Rain Internet Publishing
Providing Internet Solutions that work!
Custom Perl and Database Programming
Or just follow the directions at this location...
http://saupdates.openprotect.com/