[prev in list] [next in list] [prev in thread] [next in thread] 

List:       exim-users
Subject:    [exim] Glitch in eximstats?
From:       Sherwood Botsford <sbotsford () sjsa ! ab ! ca>
Date:       2004-11-27 23:19:16
Message-ID: 200411271745.35901.sbotsford () sjsa ! ab ! ca
[Download RAW message or body]


Eximstats doesn't work if you use syslog for logging.

It reports, "No valid log lines read."

The problem seems to be that syslog puts a timestamp and 
hostname/process at the beginning of the line.

Thus, a syslog line looks like this: {freebsd 4.5}

Nov 27 00:20:10 postie exim: 2004-11-27 00:20:10 
1CXwsL-000BUI-Cl => kmckay <contacts@sjsa.ab.ca> 
R=localuser T=local_delivery

(Above all one line.)

Running the files through cut fixes this.
cut -f 6- -d " " maillog | /opt/exim/bin/eximstats

(With syslog, I can log exim, fetchmail, spamd and popper to 
the same file and have it time sequenced.  This has helped 
me on several occasions.)

I suspect that syslog formats vary from system to system, so 
that my hack won't work elsewhere.  

The easy option may be to give eximstats a parameter for how 
many fields to skip.  

The nicest option would be to give it a bit more smarts to 
try to find the start of the data it wants.

-- 
Sherwood Botsford
St. John's School of Alberta


-- 
## List details at http://www.exim.org/mailman/listinfo/exim-users Exim details at \
http://www.exim.org/ ##


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic