Auteur: Sherwood Botsford
Date:
À: exim-users
Sujet: [exim] Glitch in eximstats?
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@???>
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