Greetings Falko!!! I have a quick question. I recently wanted to install and configure the mailgraph.cgi and the pflogsumm utility on my Ubuntu Server (v12.04) I came across your old "How To" Postfix Monitoring With Mailgraph And pflogsumm On Debian Lenny Mailgraph installed and executed without any issues. Neat application! I followed the pflogsumm section and it appears it worked but the E-mail was blank. Question: Do I need to wait for the daily cron job (/etc/cron.daily) to cycle and create the zipped file? Thanks!! DH
I've got some updated information... It appears the cron jobs are not creating the mail.log.0.gz . I've got others.. mail.log mail.log.1 mail.log.2.gz mail.log.3.gz mail.log.4.gz I ran the script against mail.log.1 and I still get a blank E-mail Any suggestions? Thanks!
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" [email protected] 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 [email protected] #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!