Postfix Logging

Thanks to http://david.schweikert.ch/, a small but powerful utility to give insights on your postfix mail server

Mailgraph is postfix logging tool. Install mailgraph

For ubuntu follow the steps

sudo apt-get install rrdtool mailgraph

dpkg-reconfigure mailgraph

During the installation, the system startup links for Mailgraph are created automatically, and Mailgraph also gets started automatically, so we don’t need to start it manually.

Mailgraph is now accessible trough the hostname or IP of your server. Open a web Browser and enter the URL http://192.168.1.100/cgi-bin/mailgraph.cgi or http://server1.example.com/cgi-bin/mailgraph.cgi, and you should see some graphs. Of course, there must be some emails going through your system before you see the first results, so be patient.

 

On Centos 7

yum install rrdtool mailgraph

yum –enablerepo=epel -y install mailgraph
edit the mailgraph configuration
vi /etc/httpd/conf.d/mailgraph.conf
Alias /mailgraph /usr/share/mailgraph
AddHandler cgi-script .cgi
<Directory /usr/share/mailgraph/>
AllowOverride None
Options +ExecCGI
DirectoryIndex mailgraph.cgi
   Order Deny,Allow
Deny from all
Allow from all

# add IP address you permit to access

</Directory>

Start mailgraph
/etc/rc.d/init.d/mailgraph start

 

restart httpd service
/etc/rc.d/init.d/httpd restart

mailgraph

mailgraph