AWStats - rough walkthrough

Discussion, support and announcements for third party applications that work with MailEnable.
Post Reply
dreniarb
Posts: 319
Joined: Mon Jan 19, 2004 5:00 pm
Location: Marion, IN

AWStats - rough walkthrough

Post by dreniarb »

After perusing the forums here and abroad, I thought I'd post my experience with awstats and how I got it working.

1. Install AWstats of course. Here is a nice walkthrough for IIS. I'm using IIS6, but it's supposed to work for IIS5 as well:

http://www.ihsen.com/support/Installing ... OnIIS6.pdf

This is fairly easy to follow. I had my stats up and going for a website I host within an hour.

2. Combine your log files so they can be converted to something awstats can read. My log files are kept on an hourly basis. I think hourly is the mailenable default, but I'll be changing it to daily now. here's a batch file I made that combined all my current log files into one big file.

Code: Select all

copy /b /y ex.log+ex*.log c:\mailenable.log
I ran this in the c:\progra~1\mailen~1\logging\smtp folder. I had to create a start file called ex.log with just a misc letter or number in it so there'd be something to start with. This created one big file with everything in it. Mine was about 125mb.

3. Convert c:\mailenable.log to an awstats format. I used melogconvert written by karlgram. I put the file in the c:\progra~1\mailen~1 folder.

http://www.jekety.net/software/melogconvert.zip

Go to a command prompt in the above folder and run this:

Code: Select all

melogconvert c:\mailenable.log > c:\mailstats.log
This took my machine about 4-5 minutes to run. the new file was only a couple megs in size.

4. Create a new conf file for awstats called awstats.mailenable.conf

here's mine:

Code: Select all

LogFile="C:\mailstats.log"
LogType=M 
LogFormat = "%time2 %email %email_r %host %host_r %method %url %code %bytesd" 
LogSeparator = " " 
DNSLookup = 0 
DirCgi = "../cgi-bin" 
DirIcons = "../icon" 
AllowToUpdateStatsFromBrowser = 0 
UseFramesWhenCGI = 1 
ShowFlagLinks = "en fr de it nl es" 
DirData = "c:/awstats data folder" 
SiteDomain = "domain name" 
HostAliases = "local domains" 
ValidSMTPCodes="250" 
ShowMenu=1 
ShowMonthStats=HB 
ShowDaysOfMonthStats=HB 
ShowDaysOfWeekStats=HB 
ShowHoursStats=HB 
ShowDomainsStats=0 
ShowHostsStats=HBL 
ShowAuthenticatedUsers=0 
ShowRobotsStats=0 
ShowEMailSenders=HBL 
ShowEMailReceivers=HBL 
ShowSessionsStats=0 
ShowPagesStats=0 
ShowFileTypesStats=0 
ShowFileSizesStats=0 
ShowBrowsersStats=0 
ShowOSStats=0 
ShowOriginStats=0 
ShowKeyphrasesStats=0 
ShowKeywordsStats=0 
ShowMiscStats=0 
ShowHTTPErrorsStats=0 
ShowSMTPErrorsStats=1 
ArchiveLogRecords=0 
PurgeLogFile=0
NOTE: in the HostAliases part, put all your local domains here. I had to run the converter twice because I neglected to do this. This will let awstats differenciate between local and external senders and receivers.

NOTE: change DirData to wherever your awstats data folder is.

5. Run the awstats.pl file on it from the command prompt (in the cgi-bin folder for awstats).

Code: Select all

awstats.pl -config=mailenable -update
This takes only a minute or two depending on the size of the log file.

6. Check your stats at your website.

IE. http://awstats.domain.com/cgi-bin/awsta ... mailenable


That should do it. One thing I've noticed is that the email count doesn't seem to be exactly right. Using MEfilter stats, I show one of my accounts sending over 1000 emails in 2 months, yet awstats only shows a few hundred for the year. I think it pertains to this account sending cc's to numerous email addresses. MEfilter is counting each cc address, where awstats only counts them all as one. I wonder if it's something that could be tweaked in the melogconverter?

I know there's probably easier ways to do this, and I haven't yet set up a nightly event to update it automatically, but this should get you going.

ESR
Posts: 1
Joined: Mon Feb 05, 2024 12:17 pm

Re: AWStats - rough walkthrough

Post by ESR »

Hello,

Is the tool "MeLogConvert.exe" still available ?
Does someone perhaps know where it can be downloaded?

Thanks,

Erik

Admin
Site Admin
Posts: 1145
Joined: Mon Jun 10, 2002 6:31 pm
Location: Melbourne, Victoria, Australia

Re: AWStats - rough walkthrough

Post by Admin »

Sorry, we don't have a copy of it. I don't know what it was doing, from memory the log files could be used without processing, but it is many years since I have tried with AWStats.

Post Reply