Koozali.org: home of the SME Server

Obsolete Releases => SME 7.x Contribs => Topic started by: larieu on September 14, 2011, 08:00:09 AM

Title: Qmail Statistics workaround sme8
Post by: larieu on September 14, 2011, 08:00:09 AM
I liked this this contrib but I disliked that you need to force install  an older awstats

I have managed to solve it with "standard" awstats

it seems pretty simple

you'll install awstats as per wiki 
http://wiki.contribs.org/AWStats (http://wiki.contribs.org/AWStats)

then you'll download the script as in qmail stat wiki 
http://wiki.contribs.org/Qmail_Statistics_%28AWStats%29 (http://wiki.contribs.org/Qmail_Statistics_%28AWStats%29)

and alter it prior to run it

from

Code: [Select]
############################
# Webserver configuration
############################

...

Alias /awstatsclasses "/usr/local/awstats/wwwroot/classes/"
Alias /awstatscss "/usr/local/awstats/wwwroot/css/"
Alias /awstatsicons "/usr/local/awstats/wwwroot/icon/"
Alias /icon "/usr/local/awstats/wwwroot/icon/"
ScriptAlias /awstats/ "/usr/local/awstats/wwwroot/cgi-bin/"

<Directory "/usr/local/awstats/wwwroot">
...

to

Code: [Select]
Alias /awstatsclasses "/var/www/awstats/classes/"
Alias /awstatscss "/var/www/awstats/css/"
Alias /awstatsicons "/var/www/awstats/icon/"
Alias /icon "/var/www/awstats/icon/"
ScriptAlias /awstats/ "/var/www/awstats/"

<Directory "/var/www/awstats">

and
from

Code: [Select]
############################
# Cronjob
############################

45 */1 * * * root /usr/local/awstats/wwwroot/cgi-bin/awstats.pl -update -config=mail >/dev/null

into

Code: [Select]
45 */1 * * * root /var/www/awstats/awstats.pl -update -config=mail >/dev/null

for me worked from first try
Title: Re: Qmail Statistics workaround sme8
Post by: larieu on September 14, 2011, 10:15:55 AM
you'll need also to modify the first bit

into
Code: [Select]
############################
# Qmail logfile preprocessor
############################
.....
/bin/cat \$SRC /var/log/qmail/current | /usr/local/bin/tai64nlocal | /usr/bin/perl /usr/local/awstats/tools/maillogconvert.pl standard | /bin/grep -v ' alias-localdelivery-'

with

Code: [Select]
/bin/cat \$SRC /var/log/qmail/current | /usr/local/bin/tai64nlocal | /usr/bin/perl /usr/bin/maillogconvert.pl standard | /bin/grep -v ' alias-localdelivery-'
Title: Re: Qmail Statistics workaround sme8
Post by: Stefano on September 14, 2011, 10:23:30 AM
please, report these modifications in bugzilla against the contrib section, thank you
Title: Re: Qmail Statistics workaround sme8
Post by: larieu on September 14, 2011, 05:46:18 PM
stefano

first I have looked there but it seems it not exist a section for this contrib - now looking more carefully I have found something into awstats section

it seems that somebody already did some work on this (almost the same)

http://bugs.contribs.org/show_bug.cgi?id=5925 (http://bugs.contribs.org/show_bug.cgi?id=5925)

he integrated this into standard awstats

but I found nothing on wiki about this
 :-?

basically the main script was used with new settings for new awstats (new paths)
and it was removed the separate web interface and integrated directly into awstats in standard menu
why nothing is written into wiki (on any of the pages http://wiki.contribs.org/AWStats (http://wiki.contribs.org/AWStats) or http://wiki.contribs.org/Qmail_Statistics_%28AWStats%29 (http://wiki.contribs.org/Qmail_Statistics_%28AWStats%29))