You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by Craig Cocca <cr...@uia.net> on 2008/04/09 20:39:31 UTC

Listing all rules and all scores

Spamassassin Users,

Is there an easy way to get spamassassin to list out all of the rules  
and all of the rule scores it's currently using?  The debug output  
only tells you what modules and configuration files are loaded, but  
we're looking for a comprehensive accounting of all of the rule names/ 
scores.

Thanks,

Craig D. Cocca
Lead Developer
ULTIMATE Internet Access
craigc@uia.net





Re: Listing all rules and all scores

Posted by Loren Wilton <lw...@earthlink.net>.
> There probably is no feature to just get Spamassassin to output all of
> that data. It shouldn't have to, however, because what you're looking
> for is kept in flat text files.

There is something to be said for this as a debug or lint-like option.  SA 
will combine rules and scores from many files, and the files can be 
different for different users.  Being able to see the actual combined result 
could occasionally be useful.

        Loren


RE: Listing all rules and all scores

Posted by Michael Hutchinson <mh...@manux.co.nz>.
> -----Original Message-----
> From: Craig Cocca [mailto:craigc@uia.net]
> Sent: 10 April 2008 6:40 a.m.
> To: users@spamassassin.apache.org
> Subject: Listing all rules and all scores
> 
> Spamassassin Users,
> 
> Is there an easy way to get spamassassin to list out all of the rules
> and all of the rule scores it's currently using?  The debug output
> only tells you what modules and configuration files are loaded, but
> we're looking for a comprehensive accounting of all of the rule names/
> scores.
> 

There probably is no feature to just get Spamassassin to output all of
that data. It shouldn't have to, however, because what you're looking
for is kept in flat text files. 

Rules are kept in different places, depending on the distribution you're
using, and how you've installed S.A.

You could search for files with a .cf extension, "locate .cf" or look in
some common folders for the rules,

They should look like this: 
10_misc.cf
20_html_tests.cf
25_antivirus.cf
And so on...

Mine are in these locations: 

/usr/share/spamassassin
/etc/mail/spamassassin
/var/lib/spamassassin

I do updates to S.A from third parties, mainly SARE and JM. I think they
get put in the /var/lib/Spamassassin/<version> directory, so they may
not exist on your system.

You will find a file (or two) in your travels to locating the rules
files, and it will be called something like 50_scores.cf which contains
many of the scores for the rules. Not all scoring is done in this file,
any .cf file can dictate scores, but if you're going to re-score rules
you must do it in /etc/mail/spamassassin/local.cf (or wherever local.cf
is for you).

Hope this helps,
Cheers,
Mike