Reading Time: 3minutes
Today I got the intention to install some software that would report Statistics for Qmail in a Web Interface.
In other words I wanted to have Web qmail statistics that would report information about the sent and received emails per domain name from the Vpopmail.
Some time ago I used a project called qmailalizer . I modified it a bit back then because all itâ€™s interface was in German and the install was a hell so I added up a little install.sh script that simplifies the installation project with qmailalizer.
Therefore I decided to install and test the software on debian 2.6.26-2-amd64 (64 bit) platform. The build failed ofcourse and thereforeI needed to install some packages which included the required header files by the qmailalizer source code. This are:
debian:~# apt-get install libgd2-xpm-dev libxml2-dev libxslt1-dev php5-xsl libxslt1-dev libxml2-dev
Hopefully afterwards your build wonâ€™t fail, but whenever you install the software youâ€™re about to face another unsavoury,error caused by the old PHP code which was dedicated to run on top of PHP4 and this days most of us uses PHP5 on our Debians.So whenever I tried to access qmailalizer I received the ugly php error:
Call to undefined function xslt_create()
In order to fix that error I used a code from a nice article by Alexandre Alapetite titled XSL transition from PHP4 xslt to PHP5 xsl . All that is necessery to be done to weed out the erroris:
Copy paste the following code:
inside the php that breaks with the error â€œCall to undefined function xslt_create()â€
And then download xslt-php4-to-php5.php and save the file with a php extension.
Thatâ€™s it now your â€œCall to undefined function xslt_create()â€ shouldnâ€™t bug you any more.
Now back to the qmaializer, though I was able to succesfully compile the qmaializer. I couldnâ€™t make the qmaializer binary work. Whenever I execute the qmaializer binary it crashes with Segmentation Fault like that:
Qmailalizer version 0.32, Copyright (C) 2001 Wolfgang Pichler
I/O warning : failed to load external entity "/var/www/qmailalizer/results.xml"
Parsing file ....
Parsing file: @400000004bb33dfc09e78f84.s
I tried using debugging what exactly procudes the segmnentation fault with Qmaializer using strace .All I can found out was that it has something to do with /etc/localtime.
A bit of googling revealed that Debian has some issue with the rrdtool binary package compiled for 64 bit architectures that dates back from the year 2007.
The exact thread concerning rrdtool and a 64 bit architecture can be red here .
This bug report advices that rrdtool is recompiled with a change in CFLAGS in debian/rules from the debian rrdtool source package whether the change should be like follows:
Change CFLAGS from debian/rules from
CFLAGS := -O2
CFLAGS := -g3 -ggdb3
I experimented changing the CFLAGS compile time options in the source of qmaializer but that didnâ€™t do any good.
Iâ€™ve decided to drop qmailalizer for the moment and use itâ€™s substitute called isoqlog .The main motive to choose drop out with qmaializer though I really like this piece of archaic soft, is that it no longer supported since the â€™2004.
Luckily isoqlog is a supported piece of software and is capable of producing most of the reports produced by qmailalizer if not all of them.
So in case if youâ€™re looking for good alternatives to QmailAlizer you should definitely check isoqlog.
Some other possibilities to Calculate and Report from your qmail logfiles is awstast, Iâ€™ve found the following article called Calculate Statistics From your Qmail logfiles an interesting reading and a good learning point.
Hope itâ€™s gonna be helpful for you too. Maybe Iâ€™m gonna try a bit more to fix up the broken isoqlog but it depends if Iâ€™ll have enough time.
If I eventually succeed and fix it. Iâ€™ll share the working copy of qmailalizer with the world.