Spamassassin Statistics

Users tips and ideas

Moderators: FlorianB, Pascal, bourgeois, mentor

screwloose
Posts: 29
Joined: Sun Dec 18, 2011 9:46 am
How did you hear about Mailcleaner: google

Spamassassin Statistics

Postby screwloose » Mon Dec 19, 2011 11:15 am

Hey Guys,

Here is another tip how you can see which SA rules are being the most effective.
Grab the perl script
wget http://www.impsec.org/~jhardin/antispam/sa-stats.pl

Then Process the SpamD logfile

perl sa-stats.pl -l /var/mailcleaner/log/mailscanner/ -f spamd.log

This will give you a top 20 of your rules and what percentage of spam and ham they are hitting.
screwloose
Posts: 29
Joined: Sun Dec 18, 2011 9:46 am
How did you hear about Mailcleaner: google

Re: Spamassassin Statistics

Postby screwloose » Mon Dec 19, 2011 11:28 am

If you want your log files split up into days then you can do the following

touch /etc/logrotate.d/spamd

Edit the file
nano /etc/logrotate.d/spamd

Paste the following

Code: Select all

# Spamassassin Logrotate
 
/var/log/spamd {
   daily
   notifempty
   missingok
   postrotate
   /usr/bin/killall -HUP spamd 2> /dev/null || true
   endscript
}

Return to “Tips”

Who is online

Users browsing this forum: No registered users and 1 guest