Koozali.org: home of the SME Server
Legacy Forums => Experienced User Forum => Topic started by: trenskow on September 03, 2004, 12:49:22 AM
-
Hi there.
I wanted to monitor my mail stats with awstats, and i couldnt find anything for is, sp i set out to find out myself, and in the process ended up making this howto.
Could someone try to follow it, to see if it works as intended.
http://www.trenskow.dk/sme/awstats_mail.html
-
Nice, although i did not follow it. There is an email monitoring contrib called isoqlog, search saco-mitel-isoqlog-0.1-09.noarch.rpm.
-
Hi Rasmus,
Seem to work fine. I have a one little correction though:
LevelForBrowsersDetection=0=0 (properly only one Zero)
I think that I will make this a part of my script sometime in the future :-)
Rgds,
Jesper Knudsen
-
Another little one:
DirCgi="/awstats/cgi-bin"
DirIcons="/awstats/icon"
/jesper
-
thanks for the feeback :-)
i will make the corrections when i come home.
i have found something myself, i get this error from Cron Deamon
/etc/cron.hourly/awstats:
Update for config "./awstats.mail.trenskow.dk.conf"
With data in log file "tai64nlocal < /var/log/qmail/current | /home/e-smith/files/ibays/awstats/cgi-bin/maillogconvert.pl standard |"...
sh: tai64nlocal: command not found
it doesnt recognize tai64nlocal from cron, but if i run the update manually, it works fine.
Someone know why that is?
-
In cron you need a complete path for all items.
The .conf file needs this:
LogFile="/usr/local/bin/tai64nlocal < /var/log/qmail/current | /home/e-smith/files/ibays/awstats/cgi-bin/maillogconvert.pl standard |"
-
all the changes written here, have been made.
I will add it to the how-to tomorow if there are found no more faults
-
Hi Rasmus,
I think that I will make this a part of my script sometime in the future :-)
Rgds,
Jesper Knudsen
You are very welcome. 8-)
-
hmm... cannot add the howto, whenever i try, i get this error here
Contribs.org Error
Error Code: 0013
ERROR: Could not query the database.
Error:
-
Hi,
can you make a how to's for email the web site statistics to each customer
-
Hi,
can you make a how to's for email the web site statistics to each customer
Do you mean multiple domains?
ie www.mydomain.com, www.mydomain1.org, www.whatever.ru?
Or do you mean, that you want an email sent to the customer, with the stats of the website?
-
Hi ,
I already got 5 virtual domain so i need to email staticstics to customer. thanks.
-
Or do you mean, that you want an email sent to the customer, with the stats of the website?
Yes i need to email stats.
-
Hi there.
I wanted to monitor my mail stats with awstats, and i couldnt find anything for is, sp i set out to find out myself, and in the process ended up making this howto.
Could someone try to follow it, to see if it works as intended.
http://www.trenskow.dk/sme/awstats_mail.html
When I followed the howto I got an hourly cron job e-mail in my admin account. I fixed this by making a change to:
/etc/cron.hourly/awstats
#!/bin/bash
cd /home/e-smith/files/ibays/awstats/cgi-bin
perl awstats.pl -config=mail.yourdomain.com -update
I changed it to this:
#!/bin/bash
cd /home/e-smith/files/ibays/awstats/cgi-bin
perl awstats.pl -config=mail.yourdomain.com -update >/tmp/null
You might want to make that change to your how-to webpage. I got tired of deleting 24 cron job e-mails everyday :)
Thank you for your work!
-
Hi All,
I've played with Awstats for mail logging on my side as well and I was not so happy with logging just from /var/log/qmail/current.
The problem I saw was that Awstats is updated every hour from current.
And multilog rotates current based on size and not time.
So each time current is rotated, you will loose all the information logged in current between the last Awstats update and the rotation from multilog.
I've solved this in /etc/cron.hourly/awstats,
I've added a line to check for any file in /var/log/qmail
whose name is starting with @ and not older than 60 minutes.
If such file(s) exists I process it(them) with maillogconvert.pl like for current and then I process current.
Hope this helps
Mael
-
Can you post the code you added to the hourly cron job?
Thanks
-
Edit:
So I use a temporay file called mailtemp to store the intermediate processes
This is my qmail part of /etc/cron.hourly/awstats
find /var/log/qmail/ -mmin -60 -name "\@*" | xargs cat | /usr/local/bin/tai64nlocal > /var/log/qmail/mailtmp
cat /var/log/qmail/current |/usr/local/bin/tai64nlocal >> /var/log/qmail/mailtmp
perl awstats.pl -config=qmail -update >/tmp/null
and this is the part of my awstats.qmail.conf
LogFile="perl /home/e-smith/files/ibays/awstats/cgi-bin/maillogconvert.pl standard < /var/log/qmail/mailtmp |"
Feel free to comment and improve
Mael