apt-get install pflogsumm
yum install postfix-perl-scripts
Needs verification and expansion
Print today's summary to the console:
nice -n 19 pflogsumm -d today /var/log/maillog | more
Generate log summary for yesterday:
perl /usr/sbin/pflogsumm -d yesterday /var/log/maillog
Use cron
to send mail log summary at AM 1:00 everyday to root
:
00 01 * * * /usr/bin/perl /usr/sbin/pflogsumm -e -d yesterday /var/log/maillog | mail -s 'Logwatch for Postfix' root