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
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
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: 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
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.