Thursday, September 19, 2013

Options - qmailmrtg7

Options - qmailmrtg7

This is a great tool for graphing your mail server's activity.
  • Compile:
cd /download/
mkdir /var/www/html/qmailmrtg

tar -xzf tar/qmailmrtg7-4.2.tar.gz
cd qmailmrtg7-4.2
patch -p0 < ../tar/qmailmrtg7-4.2-cfg.patch
make
make install
  • Configure:
# Edit qmail.mrtg.cfg and change all instances of FQDN to 'www.example.com' and WorkDir to /var/www/html/qmailmrtg

vi qmail.mrtg.cfg

:%s/\/var\/www\/html\/qmailmrtg/\/var\/www\/html\/qmailmrtg/

:%s/FQDN/www.example.com/
  • Install:
cp qmail.mrtg.cfg /etc/
indexmaker --section=title /etc/qmail.mrtg.cfg > /var/www/html/qmailmrtg/index.html

# now run mrtg 3 times to get rid of initial cron errors
env LANG=C mrtg /etc/qmail.mrtg.cfg
env LANG=C mrtg /etc/qmail.mrtg.cfg
env LANG=C mrtg /etc/qmail.mrtg.cfg
  • Execute:
o    Add the following line to your crontab
0-55/5 * * * * env LANG=C /usr/bin/mrtg /etc/qmail.mrtg.cfg > /dev/null
  • Test:
Point your browser to the following address;
http://10.1.1.161//qmailmrtg/
                                       


No comments:

Post a Comment