Configuration of Isoqlog
on QMAIL Server
For this tutorial, I downloaded isoqlog-2.2.1.tar.gz into /usr/local/src directory.
tar zxvf isoqlog-2.2.1.tar.gz
cd /usr/local/src/
tar –xzvf tar zxvf isoqlog-2.2.1.tar.gz
cd isoqlog-2.1.1
./configure (you can pass any desired options here if you want, but I never do. Use ./configure --help for more info)
make ( to compile the isoqlog package)
make install ( To install the isoqlog package)
make clean (Removing objects files...)cd isoqlog
Now you will want to make a directory called "isoqlog" within your server's html web directory. This directory is going to be the location where we will view the reports once they have been generated.
mkdir /path/to/html/directory/isoqlog (Example: mkdir /var/www/html/isoqlog)
And now we copy the needed items from the current workin directory to our new web visible "isoqlog" directory.
cp -pr ./htmltemp/images ./htmltemp/library /path/to/html/directory/isoqlog/
(Example: cp -pr /usr/local/share/isoqlog/htmltemp/temp/images /usr/local/share/isoqlog/htmltemp/library /var/www/html/isoqlog)
MASTER Configuration File for Isoqlog.
cd /usr/local/etc
We create a master configuration file...
vi isoqlog.conf
Here is a sample from my server's setup. The bold red text areas are places where you will want to substitute you own servers information.
#isoqlog 2.1 Configuration file
logtype = "qmail-multilog" #log type qmai-multilog, qmail-syslog, sendmail, postfix
logstore = "/var/log/qmail/qmail-send" #
domainsfile = "/usr/local/etc/isoqlog.domains" #
outputdir = "/var/www/default/htdocs/isoqlog" #html outpur directory
htmldir = "/usr/local/share/isoqlog/htmltemp"
langfile = "/usr/local/share/isoqlog/lang/english"
hostname = "your_hostname"
maxsender = 100
maxreceiver = 100
maxtotal = 100
maxbyte = 100
Save and exit out of the master config file.
The next step is to tell Isoqlog what domains we want it to generate stats for. In my case, I simply wanted it to report for every domain on my Qmail server. The easiest way to populate the list, in this case, is to simply create a symlink called isoqlog.domains and link it to the qmail rcpthosts file...
ln -s /var/qmail/control/rcpthosts isoqlog.domains
By making the symlink to the rcpt hosts file, we can be sure that isoqlog will always have to most current list of active domains on our server.
Configure Webmail for isoqlog.
Add following configuration in /etc/httpd/conf/httpd.conf file.
<VirtualHost 10.0.0.99:80>
ServerAdmin postmaster@example.com
DocumentRoot /var/www/html/
DirectoryIndex index.html
ServerName your_domain.com
ErrorLog logs/isoqlog-error_log
CustomLog logs/isoqlog-access_log common
</VirtualHost>
After you've run the command, you can check the results at:
http://your_domain.com/isoqlog.You should see something like this:
You should be able to click around and see stats for each domain or general stats for the whole server. It's pretty self expanatory.
Well, that's it. Isoqlog is now techinically installed and working. However, you will probably want to do a couple of customizations:
Customization 1: It's usually a good idea to run Isoqlog out of the crontab at regular intervals. This keeps you from having to always run it and it also allows you to have updated stats at almost any time at your finger tips. The creators of the software reccomend the following crontab entry:
58 * * * * /usr/local/bin/isoqlog 1>/dev/null 2>/dev/null
This will run Isoqlog at 58 minutes past the hour, every hour of the day.
Customization 2: Passwod protection. You may want to passwod protect the Isoqlog reports from public view. This can be done with plain old .htaccess/.htpasswd configuration. Nothing to it.
Hello jitendra thanks for blog
ReplyDeleteI just followed your blog to configure Isoqlog to view my postfix server stats Isoqlog is running successfully BT it is not showing my actual logs of postfix can you just guide me what mistake i am doing where should be set out postfix logs so that isoqlog show the logs on html attaching my conf file
logtype = "postfix" #log type qmai-multilog, qmail-syslog, sendmail, postfix
logstore = "/var/log/maillog" #
domainsfile = "/usr/local/etc/isoqlog.domains-dist" #
outputdir = "/var/www/html/isoqlog"
htmldir = "/usr/local/share/isoqlog/htmltemp"
langfile = "/usr/local/share/isoqlog/lang/english"
hostname = "168.235.86.221"
maxsender = 100
maxreceiver = 100
maxtotal = 100
maxbyte = 100