At 09:14 AM 8.24.2004 -0400, Matt Kettler wrote:
>At 10:08 PM 8/23/2004 -0700, Rob Blomquist wrote:
>>I am trying to figure out which rulesets are important to me, and which ones
>>aren't.
>>
>>I am probably up to about 90% of my spam being trapped, but still, some very
>>significant ones make it through, so I am trying to tune my rulesets. The
>>other thing is that the filtering is causing pauses in my use of KMail. I
>>would love to shorten or end the pauses.
>
>Hmm.. does your setup by any chance log your message statuses anywhere (ie 
>/var/log/maillog)?
>
>Really the quickest way to post-delivery evaluate is to use something like 
>this:
>
>         grep RULE_NAME maillog | wc -l
>
>Repeat for each rule and see who's making the most and the fewest hits.
>
>You could probably do the same thing with kmail's mailbox files, although 
>it would be slower.
>
>However, this won't really tell you which are "important" in the sense of 
>which ones made the difference between a FN and a hit. It will just tell 
>you which ones are getting hit the most. Determining which ones made a 
>difference is more-or-less a by-hand process.. I usually look around for 
>low scoring spam, then look at the rule hits of those..
>

This script will give you a list of all rules and times hit in ascending
order. For different analysis, I run it for the month, week & day to see
the shifts in rules hit, and new ones being hit.

Here's the script -- I grabbed it from this list I think and don't know who
to give credit for it:

  #!/bin/sh
  DEFFILES="/usr/local/etc/mail/spamassassin/*.cf"
  GREPSTR="describe"

  cat $DEFFILES | egrep ^$GREPSTR  \
     | awk '{ print "echo `fgrep " $2 " /path/to/spamboxes.* \
     | wc -l` " $2 } ' | sort | uniq | tail +2 | sh | sort -rn

  #EOF

Best regards,
Jack L. Stone,
Administrator

Sage American
http://www.sage-american.com
[EMAIL PROTECTED]

Reply via email to