Calculate statistics from your Qmail logfiles using Awstats

Aus crazylinux.de
Version vom 3. Februar 2011, 23:41 Uhr von Jonathan (Diskussion | Beiträge) (typo)
(Unterschied) ← Nächstältere Version | Aktuelle Version (Unterschied) | Nächstjüngere Version → (Unterschied)
Zur Navigation springen Zur Suche springen

found on http://www.dotdeb.org/2008/10/13/calculate-statistics-from-your-qmail-logfiles-using-awstats/


Awstats is a commonly used program to calculate web statistics from your webserver logfiles. It can detect useragents, referers, unique visitors… But one of its another feature is to build usage reports from your mail server’s logfiles, as seen on this demo.

Here is how to quickly configure Awstats to take profit of your Qmail log files…

First of all, you need to convert your /var/log/qmail/current file to make it readable to Awstats.

cat /var/log/qmail/current |tai64nlocal >/var/log/qmail/qmail.log


Hopefully, a tool is provided with the awstats package : /usr/share/doc/awstats/examples/maillogconvert.pl

You can take a look at its output by executing the following command :

/usr/share/doc/awstats/examples/maillogconvert.pl vadmin /var/log/qmail/qmail.log