Here is a small post on how to setup pflogsumm on your CentOS mail server running Postfix. It takes advantage of logrorate being called nightly by cron.
1. Install pflogsumm
# yum install postfix-pflogsumm
2. Run a test
# /usr/sbin/pflogsumm /var/log/maillog
3. Update /etc/logrotate.d/syslog. Add the following:
prerotate /usr/sbin/pflogsumm /var/log/maillog | mail -s "Postfix Logs Summary `date`" your-email-address endscript
About the author
Leave a Reply Cancel reply
You must be logged in to post a comment.
This site uses Akismet to reduce spam. Learn how your comment data is processed.