list rule hits

Jon Fraley jfraley at
Tue Aug 3 21:13:38 IST 2004

My Bayes stopped working the other day because, I'm guessing that a
number of ham messages expired dropping below 200.  So, I came up with
this one liner to check which rules are being hit.  I hope someone will
find it useful:

grep "is spam" /var/log/maillog|awk -F '5.5,' '{print $2}'|cut -d ")"
-f1|tr -cs 'a-zA-Z_0-9 .-=' '\n' | sort | uniq -c|sort -rnk1,1

You will need to change the 5.5 to your required hits.


-------------------------- MailScanner list ----------------------
To leave, send    leave mailscanner    to jiscmail at
Before posting, please see the Most Asked Questions at     and the archives at

More information about the MailScanner mailing list