Page 1 of 1

Auto update SA Rules (Rules Du Jour)

Posted: Mon Nov 07, 2005 3:20 am
by fdomartin
I found a project for make rules for SA.

SpamAssassin Rules Emporium

And another project to update it automatically Rules Du Jour

For install it:

wget http://sandgnat.com/rdj/rules_du_jour
cp rules_du_jour /opt/rulesdujour
chmod +x /opt/rulesdujour
touch /etc/rulesdojour
vi /etc/rulesdojour There was a mistake, correct: vi /etc/rulesdujour

Code: Select all

TRUSTED_RULESETS="SARE_SPAMCOP_TOP200 SARE_ADULT SARE_EVILNUMBERS0 SARE_HEADER0 SARE_HTML0 SARE_OBFU0 SARE_GENLSUBJ0 SARE_URI0"; # Rules for autoupdated

SA_DIR="/etc/mail/spamassassin";                # SA local config 

MAIL_ADDRESS="root";               # Where do Email notifications go

SA_LINT="spamassassin --lint";                  # Command used to lint spamassassin

SA_RESTART="/etc/init.d/spamassassin restart";  # Command used to restart spamd
I removed ANTIDRUG, because is only for SA <3.0

Go to Plesk admin panel:

Server -> Cron table -> Add

15 --> Minute
3 --> Hour
* --> All day
* --> All month
* --> All day of the week
/opt/rulesdujour >/dev/null 2>&1

Note:

Please choose a different time than 3:15 for your system's crontab so the servers hosting the rulesets aren't hammered at 3:15AM!! and do not schedule this to run more frequently than once per day.

More about this on http://www.exit0.us/ , thanks to Chris Thielen.

Posted: Mon Nov 07, 2005 3:35 am
by fdomartin
You can check it run /opt/rulesdujour

if you have a Perl DNS error do it:

wget ftp://rpmfind.net/linux/fedora/core/2/i ... 3.i386.rpm

rpm -Uvh perl-Net-DNS-0.45-3.i386.rpm

Note: I have this error in FC1 with ART yum sources.

Posted: Mon Nov 07, 2005 1:23 pm
by scott
Hey great post, this is really helpful. Do you know if this perl issue was because of the module not being installed, or was it because it was too old of a version?

Posted: Mon Nov 07, 2005 10:39 pm
by fdomartin
I glad to hear it!

The Perl issue is because the module is too old, and not is in the original sources. For this reason I write the link to rpmfinder.net

I don't remember what version was installed and what is required :( I sure it works with 0.45

Posted: Mon Nov 07, 2005 11:55 pm
by jamesyeeoc
Any guesses if the same perl-Net-DNS from the FC2 might also work for RH9? I notice that the filename does not include an OS specifier...

Posted: Tue Nov 08, 2005 7:08 am
by fdomartin
I'm not sure, but I think yes.

I've installed it on FC1 and hasn't any problem.

I think FC2 meaning the version of OS where is in default repository.

Try it, you allways can go back.

Posted: Wed Nov 09, 2005 7:37 pm
by scott
Id say it probably wont work, but yeah give it a shot. Barring that check out Dag's archive, see if hes got it

Posted: Thu Jun 15, 2006 3:01 am
by xtreme2490
I'm getting:

***NOTICE***: spamassassin --lint failed. This means that you have an error somwhere in your SpamAssassin configuration. To determine what the problem is, please run 'spamassassin --lint' from a shell and notice the error messages it prints. For more (debug) information, add the -D switch to the command. Usually the problem will be found in local.cf, user_prefs, or some custom rulelset found in /etc/mail/spamassassin. Here are the errors that 'spamassassin --lint' reported:

config: SpamAssassin failed to parse line, skipping: rewrite_subject 1
config: SpamAssassin failed to parse line, skipping: subject_tag *****SPAM*****
lint: 2 issues detected. please rerun with debug enabled for more information.


What can i do ?

Running Plesk 7.5.4 on RH 9.0