Index of /Linux/appnotes/SpamAssassin
saloganalysis will analyze a sendmail logfile and extract the
number of hits per SpamAssassin rule.
Usage:
# saloganalysis.pl --help
smlogsummary.pl [options]
--help List options (this screen).
--configfile={filename} Config file for master list of rules.
Masks datedetail and spamdetail output.
--date={today|yesterday} Show today's or yesterday's summary.
Not setting does all days in logfile.
--datedetail Gives detail of rules matched per day.
--debug={num} Various debug output.
--logfile={filename} Which log file to analyze. Defaults
to reading from STDIN.
--spamdetail Gives summary per spam rule.
Typical crontab:
05 00 * * * /root/bin/saloganalysis.pl --date=yesterday --logfile=/var/log/maillog --spamdetail | \
mail -s "Daily spam analysis of *ALL* spam rules" YOU@DOMAIN.COM
05 00 * * * /root/bin/saloganalysis.pl --date=yesterday --logfile=/var/log/maillog \
--configfile=/etc/mail/spamassassin/recent.cf | \
mail -s "Daily spam analysis of *recent* spam rules" YOU@DOMAIN.COM
05 00 * * * /root/bin/saloganalysis.pl --date=yesterday --logfile=/var/log/maillog \
--configfile=/etc/mail/spamassassin/antidrug.cf | \
mail -s "Daily spam analysis of *antidrug* spam rules" YOU@DOMAIN.COM