LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   awstats w/ qmail? (https://www.linuxquestions.org/questions/linux-software-2/awstats-w-qmail-195887/)

ziggie216 06-21-2004 03:39 AM

awstats w/ qmail?
 
has anyone tried to use awstats for qmail w/ vpopmail before? if so can you show me your example of the conf file. qmail got three log folder in /var/log/qmail which are qmail-pop3d qmail-send qmail-smtpd and i'm not sure how to get it configure right with awstats

mcleodnine 06-27-2004 01:37 PM

There's a listing for this in the awstats FAQ, but it doesn't work with the exaples provided when using the timestamp method that is installed with most qmail HowTo's.

Make the changes as listed in the FAQ, but replace the Logfile= section with a line like this
Code:

LogFile="cat /var/log/qmail/current | tai64nlocal | /usr/local/awstats/tools/maillogconvert.pl vadmin |"
This works for the most part, but I'm still wrestling with getting the virtual users' information parsed properly.

ziggie216 07-11-2004 03:45 AM

only problem I'm having is that the log are in three seperate folder
/var/log/qmail/qmail-pop3d
/var/log/qmail/qmail-send
/var/log/qmail/qmail-smtp

any suggestion on what I should do?

mcleodnine 07-11-2004 03:36 PM

You are probably going to want to see the data in /var/log/qmail/current

thelighteternal 07-13-2004 01:03 PM

I also have a similar problem -- and I do not have a /var/log/qmail/current file -- I do have:

/var/log/qmail/qmail-send/current
/var/log/qmail/qmail-smtpd/current
/var/log/qmail/qmail-pop3d/current

But they are not a combined log file...

Any suggestions?

thelighteternal 07-13-2004 03:07 PM

Quote:

Originally posted by mcleodnine
There's a listing for this in the awstats FAQ, but it doesn't work with the exaples provided when using the timestamp method that is installed with most qmail HowTo's.

Make the changes as listed in the FAQ, but replace the Logfile= section with a line like this
Code:

LogFile="cat /var/log/qmail/current | tai64nlocal | /usr/local/awstats/tools/maillogconvert.pl vadmin |"
This works for the most part, but I'm still wrestling with getting the virtual users' information parsed properly.


After some working around with it, the code segment provided above does work for me, but ONLY on the qmail-send/current log -- I'm not entirely certain I'm getting all the information I want out of it, but that's what I've got for now.

so in summary:

Code:

LogFile="cat /var/log/qmail/qmail-send/current | tai64nlocal | /usr/local/awstats/tools/maillogconvert.pl vadmin |"
works.

If anyone can get any of the other log files working, or has information that points to the fact that I wouldn't need the other logs (I'm not a qmail pro :]) then that information would be greatly appreciated.

ziggie216 07-15-2004 03:00 PM

ok I got it! well kinda.. but someone need to improve my method...

you'll need to run something like this before the log rotates for qmail logs

//remove previous current log
rm -f /var/log/qmail/current

//combine logs
more /var/log/qmail/qmail-pop3d >> /var/log/qmail/current
more /var/log/qmail/qmail-send >> /var/log/qmail/current
more /var/log/qmail/qmail-smtpd >> /var/log/qmail/current

then you can run the awstats. it seems like it works on my system, but I have to figure out when to run this at the end of the day right before qmail clear out the current log.

actually I have no idea what controls the log rotation

thelighteternal 07-15-2004 03:11 PM

I gave up and used Isoqlog and qmail mrtg following the advice of this page: http://sylvestre.ledru.info/howto/ho...l_vpopmail.php

ziggie216 07-15-2004 03:39 PM

I'll pm you if I figure this out. hopefully

ziggie216 07-16-2004 03:52 AM

ok this is what I put in my /etc/cron.hourly/awstats

rm -f /var/log/qmail/current
cat /var/log/qmail/qmail-pop3d/current >> /var/log/qmail/current
cat /var/log/qmail/qmail-send/current >> /var/log/qmail/current
cat /var/log/qmail/qmail-smtpd/current >> /var/log/qmail/current
/home/www/cgi-bin/awstats/awstats.pl -config=mail.domain.com -update


I'm not sure how correct the information will be but it seems like it's working so far.


All times are GMT -5. The time now is 10:08 AM.