I use hMailServer as my Email server and Awstats as my log analyse tool.
Version:
hMailServer 4.3 – Build 248
Advanced Web Statistics (Awstats) 6.5 (build 1.857)
Step 1:
In hMailServer Administrator.
Settings > Logging, check the AWStats checkbox.
The AWStats log file will be located in your installation folder. Such as
c:/hMailServer/logs/hmailserver_awstats.log
If you are not sure, just click “Show logs” button to log folder.
Step 2:
Configure of conf file, which is AWStats configuration file.
Let’s record the important lines below:
LogFile="c:/hMailServer/logs/hmailserver_awstats.log" LogType=M LogFormat="%time2 %email %email_r %host %host_r %method %url %code %bytesd" LogSeparator="\t" SiteDomain="mail.domainname.com" DirData="c:\project\stats\cgi-bin\data\hmail" AllowToUpdateStatsFromBrowser=1 ShowEMailSenders=1 ShowSMTPErrorsStats=1
It looks cool, I can track the smtp error records. Normally error 530 means the spammer try to get a open relay and failed in my email server.