SPF + Postfix Stats Script

2004-01-30

Of interest to system administrators of Postfix based mail sites:

If you're protecting your mail from spam using SPF, here's a script for generating statistics. If you're not, check out SPF.

Download the script: spfstats v. 2004-01-30, 4k.

See some sample output.

Examples of how to run it:

perl spfstats /var/log/maillog
-- generates stats for the whole file

perl spfstats --days 2 /var/log/maillog
-- generates stats for only the last two days (prior 48 hours from when you run the script)

zcat /var/log/maillog.{4,3,2,1}.gz | perl spfstats
-- you can pipe in the log data (just be sure to do it in date order)

perl spfstats --help
-- it has help