You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by nadim <na...@khemir.net> on 2004/07/29 00:01:16 UTC
Filter administration tool
Hi all,
My morning mail stayed unanswered. After looking at it again it could have
been interpreted as if I wanted help while I was in fact offering help. (I
got my free ride yesterday (thanks for the answers guys) like to pay back
ASAP)
I'd gladly troll out a little script that extracts what filters are installed
what scores it has and when it was installed and if it needs update. Now I
won't do that if I'm the only one needing this. If anyone is interrested,
please give me some ideas of what kind of output you'd like to see. I've
added a DHTML output plug-in to one of my modules so I think it could also
generate something looking quite good as well as a normal text dump.
I have some time free tomorrow, so you requirements should come quite soon.
It's bed time on my side of the Atlantic. So I'll grab some sleep before
getting on it.
cheers, Nadim.
On Wednesday 28 July 2004 12:15, nadim wrote:
> Hi, I noticed that some some tests are not assigned any score.
>
> A mail that already qualified for **SPAM** had a HOT_NASTY score of 0!
>
> Is there any tool to handle all those nifty filters?
>
> SA is a great tool and it almost make me miss the spam ;-) but the
> configuration of the built-in filters, the add-in filter and the user_pref
> filters added to the updating chore is a bit messy. I will not just
> complain, I'll do the job if the problem is felt by more than me and you
> give me enough input.
>
> Another interresting, and related, question is how do I get stats over what
> rules are installed, which one fire and how much do they score.
Re: Filter administration tool
Posted by Steven Stern <su...@sterndata.com>.
On Fri, 30 Jul 2004 18:24:33 +0200, nadim <na...@khemir.net> wrote:
>Go through "/usr/share/spamassassin" and "/etc/mail/spamassassin/" and parse
>the rules in all present cf files. I do it in a rather simple way and it
>would have been nice if modules to do that where present in Mail::SA (which
>might be already)
I May Be Wrong (TM), but I believe that the .cf files in
/usr/share/spamassassin are all the rules that ship with SA. The .cf files in
/etc/mail/spamassassin are the ones in use.
--
Steve
Re: Filter administration tool
Posted by nadim <na...@khemir.net>.
On Thursday 29 July 2004 17:46, Patrick Shoaf wrote:
> I would greatly appreciate any method to see which test I have installed,
> and their scores. A simple table showing Test Name and score would be
> sufficient. If there was a version or last update date, a column for that
> would be nice. I then could quickly verify 1) I have all test I need/want
> 2) I have scores that work for me 3) if there is a version/date, if the
> test is the most recent.
Hi,
You can get what I have (described bellow) but I doubt it will do what you
want (you can try convince me to add what you want) as I, who have used SA
for 3 days only, find myself using 1924 rules!!!
I have written a perl script and here is what it does and presents:
Go through "/usr/share/spamassassin" and "/etc/mail/spamassassin/" and parse
the rules in all present cf files. I do it in a rather simple way and it
would have been nice if modules to do that where present in Mail::SA (which
might be already)
if you give the script a rule name or names, you get this:
rule 'URGENT_BIZ' :
|- body = /usr/share/spamassassin/20_phrases.cf:418
|- body_definition = /urgent.{0,16}(?:assistance|business|buy|confidential|
notice|proposal)/i
|- describe = Contains urgent matter
|- describe_address = /usr/share/spamassassin/20_phrases.cf:419
|- score = 2.0
|- score_address = /etc/mail/spamassassin/local.cf:15
`- warnings
`- 0 = Redefinition of 'URGENT_BIZ:score' at
'/etc/mail/spamassassin/local.cf:15' was defined at
/usr/share/spamassassin/50_scores.cf:850
(not wrapped of course)
warnings:
Redefinition of 'URGENT_BIZ:score' at '/etc/mail/spamassassin/local.cf:15' was
defined at /usr/share/spamassassin/50_scores.cf:850
Redefinition of 'VIRUS_WARNING202:score' at
'/etc/mail/spamassassin/bogus-virus-warnings.cf:1195' was defined
at /etc/mail/spamassassin/bogus-virus-warnings.cf:1190
Redefinition of 'VIRUS_WARNING_NETSKY4:describe' at
'/etc/mail/spamassassin/bogus-virus-warnings.cf:2369' was defined
at /etc/mail/spamassassin/bogus-virus-warnings.cf:2365
and some stats:
1924 rules in 38 files [12910 lines]:
/usr/share/spamassassin/20_anti_ratware.cf no rules [184 days]
/usr/share/spamassassin/10_misc.cf no rules [184 days]
....
/etc/mail/spamassassin/70_sare_adult.cf 68 rules [3 days]
/etc/mail/spamassassin/local.cf 1 rule [3 days]
....
if you run the script without a rule name, you get:
Spamassassin rules [1924]
|- ACCEPT_CREDIT_CARDS
| `- score = 2.507 2.596 0 1.037
|- ACCESSDB
| `- score = 0
|- ACT_NOW_CAPS
| `- score = 0.545 1.343 0 0.699
|- ADDRESSES_ON_CD
| `- score = 0
... 1920 more rules
and this stats:
1924 rules in 38 files [12910 lines]:
lowest score: -100.000.
Highest score: 1000.
338 rules without score.
197 rules with score '0' (disabled!).
what you get listed is easily configurable.
Is that what you want? You'll have to install some perl modules.
Some people are able to show stats about what filter triggers. Is that a
standard tool? where do we get it?
Cheers, Nadim.
Re: Filter administration tool
Posted by nadim <na...@khemir.net>.
Here is the script I use. I'd be happy to know if anyone has had any use for
it.
Cheers, Nadim.
Re: Filter administration tool
Posted by Patrick Shoaf <ps...@model-cleaners.com>.
I would greatly appreciate any method to see which test I have installed,
and their scores. A simple table showing Test Name and score would be
sufficient. If there was a version or last update date, a column for that
would be nice. I then could quickly verify 1) I have all test I need/want
2) I have scores that work for me 3) if there is a version/date, if the
test is the most recent.
Patrick Shoaf
At 06:01 PM 7/28/2004, nadim wrote:
>Hi all,
>
>My morning mail stayed unanswered. After looking at it again it could have
>been interpreted as if I wanted help while I was in fact offering help. (I
>got my free ride yesterday (thanks for the answers guys) like to pay back
>ASAP)
>
>I'd gladly troll out a little script that extracts what filters are installed
>what scores it has and when it was installed and if it needs update. Now I
>won't do that if I'm the only one needing this. If anyone is interrested,
>please give me some ideas of what kind of output you'd like to see. I've
>added a DHTML output plug-in to one of my modules so I think it could also
>generate something looking quite good as well as a normal text dump.
>
>I have some time free tomorrow, so you requirements should come quite soon.
>It's bed time on my side of the Atlantic. So I'll grab some sleep before
>getting on it.
>
>cheers, Nadim.
>
>On Wednesday 28 July 2004 12:15, nadim wrote:
> > Hi, I noticed that some some tests are not assigned any score.
> >
> > A mail that already qualified for **SPAM** had a HOT_NASTY score of 0!
> >
> > Is there any tool to handle all those nifty filters?
> >
> > SA is a great tool and it almost make me miss the spam ;-) but the
> > configuration of the built-in filters, the add-in filter and the user_pref
> > filters added to the updating chore is a bit messy. I will not just
> > complain, I'll do the job if the problem is felt by more than me and you
> > give me enough input.
> >
> > Another interresting, and related, question is how do I get stats over what
> > rules are installed, which one fire and how much do they score.
Patrick J. Shoaf, IT Manager
pshoaf@model-cleaners.com
Model Cleaners, Uniforms, & Apparel
100 Third Street
Charleroi, PA 15022
<http://www.model-uniforms.com/>http://www.model-uniforms.com
Phone: 724-489-9553 ext. 105
or 800-99 MODEL
Fax: 724-489-4386