Sources under BSD licence

Return to Sources under BSD licence home page

A simple log file scanner for the Postfix Postscreen service. This script gives an overview of how Postscreen is performing.

Tested on FreeBSD 8.3 and Postfix 2.9. Read the comments in the script to see what options you may need to tweak.

BSD license

Download pslogscan.tar-gz 1.4 (2KB)


Sample output, showing Postscreen rejecting about 66% of the incoming mail. Note this maillog is about 158MB in size. The results of the time command are shown after the sample output.


Scanning /var/log/maillog

CONNECT log records: 116340
PASS NEW log records: 8190
PASS OLD log records: 37002
WHITELISTED log records: 2289
BLACKLISTED log records: 0

rejected: 77049 (66%)

Protocol errors:
HANGUP log records: 62580
PREGREET log records: 3927
BARE NEWLINE log records: 21
COMMAND TIME LIMIT log records: 168
COMMAND PIPELINING log records: 21

DNS black lists log records: 57939 28098 66654

DNSBL blocked log records: 50610
DNSBL rank 3: 10353
DNSBL rank 4: 0
DNSBL rank 5: 0
DNSBL rank 6: 19698
DNSBL rank 7: 0
DNSBL rank 8: 0
DNSBL rank 9+: 20559

DNSBL blocks by domain: 8253 1449 35679
example.bix: 2268


Time command results for the above sample:

   real    0m3.407s
   user    0m2.499s
   sys     0m1.849s