Comments on Postfix Monitoring With Mailgraph And pflogsumm On Debian Etch
Postfix Monitoring With Mailgraph And pflogsumm On Debian Etch This article describes how you can monitor your Postfix mailserver with the tools Mailgraph and pflogsumm. Mailgraph creates daily, weekly, monthly, and yearly graphs of sent, received, bounced, and rejected emails and also of spam and viruses, if SpamAssassin and ClamAV are integrated into Postfix (e.g. using amavisd-new). These graphs can be accessed with a browser, whereas pflogsumm ("Postfix Log Entry Summarizer") can be used to send reports of Postfix activity per email.
4 Comment(s)
Comments
In my situation Ubuntu 7.04 (Feisty) the script (postfix_report.sh) complained that the formail command was not found.
It exists in the procmail package so you may need to install this package along with the pflogsumm.
In my enviroment using debian etch and suphp. Installing mailgraph I had to chown /var/www/www.example.com/cgi-bin/mailgraph.cgi and /var/lib/mailgraph to the appropriate owner and group.
Hi,
First, thank you for this nice tutorial.
AFAIC, I prefer adding "delaycompress" option to logrotate stanza so that I always have yesterday logs readable as is and, so, don't have to gunzip and gzip back *.log.0 files.
BTW, rather than modifying /etc/logrotate.conf, I suggest to create a dedicated file in /etc/logrotate.d/, like /etc/logrotate.d/mail with the following content
/var/log/mail.log {
missingok
daily
rotate 7
create
compress
delaycompress
start 0
}
Finally, instead of editing the crontab, I prefer creating a symlink to the script, in this case, in /etc/cron.daily; or if you want a custom schedule, create an /etc/cron.d/pflogsumm file.
Thank you again
Bests
Tarax
As with others here, thanks. I'm using Debian 5.0 but it runs the same.
Note that is you are using rsyslog you'll need to comment out the mail.log reference in /etc/logrotate.d/rsyslog or you'll get a duplicate log reference error when logrotate attempts to execute. If you don't notice it for a couple days it could be a real bitch as it prevents logrotate from running.
Snip from /etc/logrotate.d/rsyslog:
...
/var/log/mail.info
/var/log/mail.warn
/var/log/mail.err
#/var/log/mail.log
/var/log/daemon.log
/var/log/kern.log
/var/log/auth.log
/var/log/user.log
...