I think I got it working!
I had to make a few adjustments to the CRON job and the script..
What I did is leave out the compression all together. I then instructed PFLOGSUMM to look at mail.log and pull yesterday's information.
Code:
perl /usr/sbin/pflogsumm -d yesterday /var/log/mail.log | mail -s "Mail Statastics" dalehutch@hutchtechnologies.com
I then put that into your postfix_report.sh
Code:
#!/bin/sh
#PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
#gunzip /var/log/mail.log.2.gz
perl /usr/sbin/pflogsumm -d yesterday /var/log/mail.log | sendmail dalehutch@hutchtechnologies.com
#gzip /var/log/mail.log.2
exit 0
In the CRON job I put this.
Code:
/usr/local/sbin/postfix_report.sh
I took off the "&> /dev/null" it would send a blank E-mail
Now all I have to do is add a few options to include a subject.
Thank you Falko!
Without all your tutorials I would not have been able to figure it out!
Recent comments
16 hours 2 min ago
17 hours 1 min ago
20 hours 48 min ago
22 hours 2 min ago
1 day 1 hour ago
1 day 8 hours ago
1 day 17 hours ago
1 day 19 hours ago
2 days 10 hours ago
2 days 12 hours ago