Monitoring Mail server queues is always not an easy job. That too when our servers becomes victims of spammers, it takes hell a lot of job to identify the spammer and block him.
Yesterday I came across this wonderful tool called “Isoqlog“written in C. A turkey software development team at EnderUnix has developed this tool to keep and eye on qmail, postfix, sendmail and exim mail server activities by scanning their logs. This tool generates HTML statistics pages which can be accessed via your web browser. It also produces Top domains output according to Sender, Receiver, Total mails and bytes; it keeps your main domain mail statistics with regard to Days Top Domain, Top Users values for per day, per month and years.
It really made my job easier on a qmail server. Now its your turn to try it on your mail servers.Installation of this tool is very simple. Download the latest tarball from EnderUnix.org and follow the other instructions given below :
a) Downloading tar ball
# wget http://www.enderunix.org/isoqlog/isoqlog-2.2.1.tar.gz
b) untar the tar ball and get into source directory
#tar -zxvf isoqlog-2.2.1.tar.gz
#cd isolog-2.2.1
c) Now install the app (README and INSTALL files can be found in the source directory)
1. ./configure If you would like to use default options just type 'configure' To see more options type 'configure --help'2. make Compiling... 3. make install Installing... 4. make clean Removing objects files...
By default isoqlog is installed in /usr/local
ps: if you come across any errors, refer to the faq on the isoqlog website or comment on my post.
d) Now its time to configure:
isoqlog generates html files under your servers main document root ( /var/www/html/isoqlog). This folder required couple of folders to be copied from the source to provide the required css files and images.
#cp -r images /var/www/html/isoqlog
#cp -r library /var/www/html/isoqlog
(Please create a directory called isoqlog or run isoqlog command to get it created automatically)
Sample configuration file for isoqlog is available at /usr/local/etc copy this isoqlog.conf as follows.
#cp /usr/local/etc/isoqlog.conf-dist /usr/local/etc/isoqlog.conf
the last this required for isoqlog to start generating the logs is domain names:
I ran a piece of code to get the list of domains configured on my qmail server and added it to /usr/loca/etc/isoqlog.domains
for i in `ls /home/vpopmail/domains `; do echo $i >> /usr/local/etc/isoqlog.domains ; done
Okay, now just run
#/usr/local/bin/isoqlog
or just
#isoqlog
to start generating the logs which can be accessed via your webserver : Example: http://servername.com/isoqlog
To automate the log generation add a cron job to your crontab
# crontab -e
(the above command will open the cronjob’s file add the following line and save the file)
58 * * * * /usr/local/bin/isoqlog 1>/dev/null 2>/dev/null
this will run isoqlog every hour at 58. minute
Thanks again to the development team.
Let me know if you can get it work for your other MTA’s.
Happy MTA monitoring
March 6th, 2008 at 1:13 pm
really informative ……[:)]