Mailgraph - a RRDtool frontend for Mail statistics

by David Schweikert

Mailgraph is a very simple mail statistics RRDtool frontend for Postfix and Sendmail that produces daily, weekly, monthly and yearly graphs of received/sent and bounced/rejected mail.

Download it

Mailing-List

There is a low-volume mailing-list with announcements and discussions about mailgraph. You can subscribe by sending a mail to [email protected] with subject "subscribe mailgraph".

You can also access the archives.

Development

Mailgraph development is currently very slow. You can follow it on github.

Mailgraph Mini-FAQ

How is it possible that in the day graph I see a maximum of 3 msg/min and the peak only tops at 0.375 msg/min?

The drawed value in the graph is a "rate": mailgraph collects the number of messages sent every minute and rrdtool does "consolidate" the data for the graph being draw. For the first graph the consolidation is done on eight minutes, which means that if three message were sent in eight minutes, the value would be 0.375 messages / minute.

The rrd and thus also graphs do not get updated anymore.

The data in the rrd needs to be entered with data that is strictly in increasing time. If for some reason (wrong guessing by mailgraph of the year for example) you get a date in the future, then mailgraph will skip any data that you give it until it is bigger than that date. You can have a look with rrdtool dump to see what is the last timestamp in the database. If that happens, then you should get a correct rrd from backup and start to give it data with increasing time again.

Why are there no received mails? I use the fetchmail and mailgraph with the option --ignore-localhost.

fetchmail forwards mails to localhost so they are filtered out. Use the option smtphost <real hostname> in your fetchmailrc.

This Mini-FAQ is also available in french.

Spin-offs

The source of mailgraph was used as a basis to implement these other graphing tools:
queuegraph by Ralf Hildebrandt
Statistics for the Postfix queue
couriergraph by Ralf Hildebrandt
Statistics for the Courier IMAP/POP daemon
dnsgraph by Przemyslaw Sztoch
DNS statistics for Bind
greygraph by Markus Neubauer
Statistics for mail greylisting (Postgrey / Sqlgrey)

Return to my Homepage