Bug#476541: exim4-base: please handle nearly-empty logfile in daily cronjob stats

Justin Pryzby justinpryzby at users.sourceforge.net
Thu Apr 17 12:41:52 UTC 2008


Package: exim4-base
Version: 4.69-2+b1
File: /etc/cron.daily/exim4-base

Sometimes, I get these messages rather than the expected report (The
first message is empty):

On Wed, Apr 16, 2008 at 07:35:09AM -0400, root wrote:

On Wed, Apr 16, 2008 at 07:41:44AM -0400, Anacron wrote:
> /etc/cron.daily/exim4-base:
> **** No valid log lines read
> Null message body; hope that's ok

That's probably due to very low mail volume on this laptop machine, in
combination with an earlier logfile rotation.

/var/log/exim4/mainlog
2008-04-17 07:42:11 Start queue run: pid=12298
2008-04-17 07:42:11 End queue run: pid=12298
2008-04-17 08:12:10 Start queue run: pid=12583
2008-04-17 08:12:10 End queue run: pid=12583
2008-04-17 08:30:32 exim 4.69 daemon started: pid=13220, -q30m, listening for SMTP on [127.0.0.1]:25
2008-04-17 08:30:33 Start queue run: pid=13225
2008-04-17 08:30:34 End queue run: pid=13225

$ /usr/sbin/eximstats </var/log/exim4/mainlog
**** No valid log lines read

Sending a message writes data to the logfile and eximstats once again
runs normally.

eximstats should be patched to handle nearly-empty logfiles, probably
by perhaps exitting silently, or perhaps by simply outputting
"Nearly-empty logfile".  Or perhaps the cron tab should avoid running
the stats script in that case, like:

sed -re 's/^[-0-9 :]{19} //' /var/log/exim4/mainlog |
grep -vwe '^Start' -e ^End -e ^exim >/dev/null && eximstats <... |
mail ...





More information about the Pkg-exim4-maintainers mailing list