Skip to main content

How to Produce Postfix MTA logfile summary using Pflogsumm on CWP?

Pflogsumm is a log analyzer/summarizer for the Postfix MTA. It is designed to provide an over-view of Postfix activity, with just enough detail to give the administrator a "heads up" for potential trouble spots. Pflogsumm generates summaries and, in some cases, detailed reports of mail server traffic volumes, rejected and bounced email, and server warnings, errors and panics.

CentOS 7 & Ubuntu 16:
# yum -y install postfix-perl-scripts
# sudo apt install pflogsumm [ For Ubuntu ]

Generate Log Summary
# perl /usr/sbin/pflogsumm -d yesterday /var/log/maillog
# perl /usr/sbin/pflogsumm -d today /var/log/maillog
Generate Log Once a Day and Received via Mail
# crontab -e
0 0 * * * perl /usr/sbin/pflogsumm -e -d yesterday /var/log/mail.log | mail -s 'Logwatch for Postfix' admin@awsmonster.com
Generate More Details
CentOS
sudo pflogsumm /var/log/maillog  [Weekly]
sudo pflogsumm -d today /var/log/maillog --problems_first
sudo pflogsumm -d today /var/log/maillog --rej_add_from

Ubuntu
sudo pflogsumm /var/log/mail.log  [Weekly]
sudo pflogsumm -d today /var/log/mail.log --problems-first
sudo pflogsumm -d today /var/log/mail.log --rej-add-from 
Courtesy Link

Comments