Mailgraph: Email Monitoring (Spam, Rejects, Viruses...)
Introduction
Mailgraph is a software tool that generates graphs of email statistics such as spam, viruses, and more.
It provides a good overview of what’s happening on your mail server.
Installation
The installation is really simple:
|
|
Now you just need to access the interface. On Apache:
http://mysite/cgi-bin/mailgraph.cgi
And on Lighttpd:
http://mysite/mailgraph
Mailgraph without CGI
Whether for performance, security, or simplicity reasons, it’s quite common not to have a CGI module on a server (installing CGI with nginx is tedious for example). However, the mailgraph stats tool is only designed to run in CGI. Here is a small script that allows you to generate mailgraph graphs without CGI:
|
|
This script can be added to crontab, which allows regular saving of the generated graphs. Tested on Debian, FreeBSD and OpenBSD (MAILGRAPH_PATH variable should be adapted).
FAQ
No graphs displaying under Lighttpd
I encountered this annoying bug where no graphs are displayed. To work around this issue (not in an elegant way), you must edit the file /etc/lighttpd/conf-enabled/50-mailgraph.conf
and modify the 2nd line:
|
|
Here “/mailgraph” has been replaced with “/mailgraph.cgi”. Reload your lighttpd configuration and it should work.
Resources
Last updated 03 Feb 2010, 06:33 +0200.