Posts

Showing posts from October, 2015

Daily mail statictics from postfix and pflogsumm via cron

On Centos   yum install postfix-perl-scripts create new script file mcedit /etc/cron.daily/pflogsumm.sh #!/bin/sh # Mail Statistics MAIL_LOG=/var/log/maillog MAILHOST="YOUR.HOSTNAME.COM" RECIPIENT="[email protected]" # Generate the statistics and mail the result to $RECIPIENT /usr/sbin/pflogsumm -d yesterday ${MAIL_LOG} | \ mail -s "${MAILHOST} Mail Statistics" ${RECIPIENT} chmod +x /etc/cron.daily/pflogsumm.sh Enjoy!