archive.mgm51.com

Sources under BSD licence

Return to Sources under BSD licence home page
PSLOGSCAN

A simple log file scanner for the Postfix Postscreen service. This script gives an overview of how Postscreen is performing. Written for /bin/sh Bourne Shell.

Initially tested on FreeBSD 8.4 and Postfix 2.11.1. It has run fine on interim versions of FreeBSD and Postfix. Currently running with FreeBSD 13.0 and Postfix 3.6.2.

Read the comments in the script to see what options you may need to tweak.

BSD license

Download pslogscan.tar.gz 1.8 (2KB)

Update, February 6, 2021: I no longer maintain or update this script. There's an updated version (v1.9) that pulls some configuration parameters from main.cf using postconf, negating the need to enter some of those parameters manually.

The new home for pslogscan.sh is dmdmdm on github

Thank you for your interest in pslogscan.sh.

 

 

Sample output, showing Postscreen rejecting about 18% of the incoming mail.

 

Scanning /var/log/maillog

Screening status log records:
CONNECT: 705024
PASS NEW: 31104
PASS OLD: 228096
WHITELISTED: 316224
BLACKLISTED: 0

rejected: 129600 (18%)


Protocol error log records:
HANGUP: 57024
PREGREET: 10368
BARE NEWLINE: 0
COMMAND TIME LIMIT: 0
COMMAND PIPELINING: 0

DNS black list log records:
zen.spamhaus.org: 160704
bl.spamcop.net: 51840
b.barracudacentral.org: 98496

DNSBL NOQUEUE log records:
DNSBL rank 1: 0
DNSBL rank 2: 0
DNSBL rank 3: 10368
DNSBL rank 4: 0
DNSBL rank 5: 10368
DNSBL rank 6: 51840
DNSBL rank 7: 0
DNSBL rank 8: 46656
DNSBL rank 9: 0
DNSBL rank 10+: 0

DNSBL NOQUEUE by domain:
example.com: 36288
example.net: 15552
example.org: 0