[RESOLVED] AWSTAT rotation of log.

Use this forum if you have installed hMailServer and want to ask a question related to a production release of hMailServer. Before posting, please read the troubleshooting guide. A large part of all reported issues are already described in detail here.
Post Reply
sbouli
Normal user
Normal user
Posts: 69
Joined: 2007-11-27 12:37

[RESOLVED] AWSTAT rotation of log.

Post by sbouli » 2008-04-08 12:48

Hi,

I am using hMailServer for a little time now, and my hmailserver_awstats.log is more than 1Go big.
I was wandering if I don't have to rename it in order to avoid problems, but ... then what about my stats ?
How should I process ?

(I am using windows 2003 server).

Thanks for your help ..

Stéphane
Last edited by sbouli on 2008-04-10 19:07, edited 1 time in total.

minsik
Normal user
Normal user
Posts: 92
Joined: 2006-08-03 13:08
Location: South Australia

Re: AWSTAT rotation of log.

Post by minsik » 2008-04-08 14:33

From the documentation.
AWStats support
In the logging settings, you can specify that you want to create an AWstats log. This log can be parsed by AWstats to produce delivery statistics for your email server.
-----------------------------------
I think you have to manually rename the file and hmailserver will then create a new file. i also think you can configure awstats to use more than one file ??? thinks only.
sorry cant be more help. I did read somewhere hmailserver use of this is very simple and if you have that much email then its up to you to make a regular name change and manage the installation.

Good luck and someone who uses this may reply soon who actually does this.
I have looked at awstats but cant make head nor tail from the install instructions. I would like to find a simple open source program that can be used in windows.
Windows XP
hmailserver (latest beta allways) (except db versions)
test config, trying to convince the boss to use hmail!
ASSP - front end SPam killer

User avatar
SorenR
Senior user
Senior user
Posts: 3567
Joined: 2006-08-21 15:38
Location: Denmark

Re: AWSTAT rotation of log.

Post by SorenR » 2008-04-08 16:27

AWStats is very easy to install/get working. Been using it on W2K and WXP for years and now recently on W2K3RC2 8)
When AWStats read information from the hMS log, it will purge those records at the same time. I have set AWStats to run every 2 hours and my hmailserver_awstats.log never grow beyond 20K.
SørenR.

“With age comes wisdom, but sometimes age comes alone.”
- Oscar Wilde

redrummy
Senior user
Senior user
Posts: 370
Joined: 2007-06-21 06:52
Location: Alaska

Re: AWSTAT rotation of log.

Post by redrummy » 2008-04-08 18:40

To clarify Soren's post, the AWstats conf file has an option to purge the log file(s) once read. It doesn't need the raw log information after it's already parsed it and saved to its own data file.

And yes, you can rename the existing hmailserver_awstats.log file and still use it for AWstats (you can use wildcards to select log files in the conf).

The AWstats conf is very long, but well commented. Give it a read to understand its options.

User avatar
SorenR
Senior user
Senior user
Posts: 3567
Joined: 2006-08-21 15:38
Location: Denmark

Re: AWSTAT rotation of log.

Post by SorenR » 2008-04-08 20:12

To cut a short story long :roll:

My AWStats config... Replace acme.inc with your domain :P

Besides installing AWStats, setting up virtual directories in IIS (eg. /stats -> C:\Inetpub\SharedApps\AWStats\wwwroot\cgi-bin) and copying the config in the right place following needs to be changed:

"LogFile=" must point to hMailserver_awstats.log
"DirData=" must point to AWStats data directory (R/W by webserver/perl user)
"DirCgi=" must point to Relative or absolute web URL of your awstats cgi-bin directory

Lots of information here --> http://awstats.sourceforge.net/

It's a 10 minute job done right 8) or a 3 day nightmare if you get off on the wrong foot :twisted:
Attachments
awstats.mailserver.zip
(17.44 KiB) Downloaded 190 times
SørenR.

“With age comes wisdom, but sometimes age comes alone.”
- Oscar Wilde

sbouli
Normal user
Normal user
Posts: 69
Joined: 2007-11-27 12:37

Re: AWSTAT rotation of log.

Post by sbouli » 2008-04-10 19:06

Thanks a lot,
for the information, the parameter is :

# AWStats can purge log file, after analyzing it. Note that AWStats is able
# to detect new lines in a log file, to process only them, so you can launch
# AWStats as often as you want, even with this parameter to 0.
# With 0, no purge is made, so you must use a scheduled task or a web server
# that make this purge frequently.
# With 1, the purge of the log file is made each time AWStats update is run.
# This parameter doesn't work with IIS (This web server doesn't let its log
# file to be purged).
# Change : Effective for new updates only
# Possible values: 0 or 1
# Default: 0
#
PurgeLogFile=1


Thanks for your help !!

Stéphane

ewieldra
Normal user
Normal user
Posts: 37
Joined: 2008-04-24 23:23
Location: The Netherlands

Re: [RESOLVED] AWSTAT rotation of log.

Post by ewieldra » 2008-06-13 13:09

too bad it's not possible to log the
smtp routes to the logfile
Best regards,

Emiel Wieldraaijer
The Netherlands

Post Reply