The Sysadmin’s Daily Grind: Mail and Queuegraph
Worms, mail bombs, and users who send multiple megabyte Powerpoint files across the wire give Postfix administrators plenty of reasons to view their charges with a critical eye from time to time.
Mailgraph has been giving me useful information for a long while now . It is time to turn the spotlight on this visualization tool for Postfix logfiles and to introduce the related Queuegraph project. Mailgraph  is a small footprint daemon that continuously reads the Postfix logfile and shovels the data it gathers into a round robin database (RRD). The front-end is a CGI script that generates a graph based on the RRD data. The program requires the ubiquitous Perl interpreter, RRDTool  for the database, and the File::Tail Perl module, which you can obtain from the CPAN archive. The heart of Mailgraph is a Perl script called mailgraph.pl; the daemon I referred to earlier. You can launch the daemon manually, but it makes more sense to add the init script provided by the distribution to run the daemon when you boot your machine. I use the following command to launch Mailgraph: