I implemented the postscreen capability on a small MTA I run for
friends and family.  Once I got postscreen configuration producing the
results I wanted, I soon tired of watching the detailed maillog to see
how postscreen was operating.  So I wrote a quick shell script to
summarize the log file and give me an overview of how well postscreen
is working.

I offer the script to anyone who would like to use it.   One company I
worked for would not allow open source software into the company unless
there was an explicit license on the software, so I put the BSD license
on the script.  

You can download the script from here:
 http://archive.mgm51.com/sources/pslogscan.html


Here is the sample output that pslogscan.sh produces:

Scanning /var/log/maillog

 All "incoming" log records:           5789
   All "status=sent"  log records:     1873
   All "status=deferred"  log records: 10
                     rejected:         3906  (67%)
   
   PASS NEW log records:  390
   PASS OLD log records:  1762
   
   WHITELISTED log records:  109
   BLACKLISTED log records:  0
   
   Protocol errors:
                  HANGUP log records:  2980
                PREGREET log records:  187
            BARE NEWLINE log records:  1
      COMMAND TIME LIMIT log records:  8
      COMMAND PIPELINING log records:  1
   
   DNS black lists log records:
            zen.spamhaus.org:  3174
             dnsbl.sorbs.net:  1338
      b.barracudacentral.org:  2759
   
   DNSBL blocked log records: 2410
      DNSBL rank 3:  493
      DNSBL rank 4:  0
      DNSBL rank 5:  0
      DNSBL rank 6:  938
      DNSBL rank 7:  0
      DNSBL rank 8:  0
      DNSBL rank 9+: 979
   
   DNSBL blocks by domain: 
              example.com: 393
              example.biz: 69
              example.net: 1699
             example.info: 108
 

Reply via email to