From bounce-debian-bugs-dist==chris-lamb.co.uk@lists.debian.org Sun Apr 20 20:36:45 2008
Received: from liszt.debian.org ([82.195.75.100])
	by chris-lamb.co.uk with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32)
	(Exim 4.63)
	(envelope-from <bounce-debian-bugs-dist==chris-lamb.co.uk@lists.debian.org>)
	id 1JnfL5-0000lG-Ta
	for bot.address@chris-lamb.co.uk; Sun, 20 Apr 2008 20:36:45 +0100
Received: from localhost (localhost [127.0.0.1])
	by liszt.debian.org (Postfix) with QMQP
	id E6CAC13A5273; Sun, 20 Apr 2008 19:36:38 +0000 (UTC)
Old-Return-Path: <debbugs@rietz.debian.org>
X-Spam-Checker-Version: SpamAssassin 3.2.3 (2007-08-08) on liszt.debian.org
X-Spam-Level: 
X-Spam-Status: No, score=-3.0 required=4.0 tests=BAYES_00,MURPHY_DRUGS_REL8,
	RCVD_IN_DNSWL_LOW autolearn=no version=3.2.3
X-Original-To: debian-bugs-dist@lists.debian.org
Delivered-To: lists-debian-bugs-dist@liszt.debian.org
Received: from rietz.debian.org (rietz.debian.org [140.211.166.43])
	by liszt.debian.org (Postfix) with ESMTP id D584013A5255;
	Sun, 20 Apr 2008 19:36:26 +0000 (UTC)
Received: from debbugs by rietz.debian.org with local (Exim 4.63)
	(envelope-from <debbugs@rietz.debian.org>)
	id 1JnfKV-0000i3-5N; Sun, 20 Apr 2008 19:36:03 +0000
X-Loop: owner@bugs.debian.org
Subject: Bug#476541: exim4-base: please handle nearly-empty logfile in daily cronjob stats
Reply-To: Marc Haber <mh+debian-packages@zugschlus.de>, 476541@bugs.debian.org
Resent-From: Marc Haber <mh+debian-packages@zugschlus.de>
Resent-To: debian-bugs-dist@lists.debian.org
Resent-CC: Exim4 Maintainers <pkg-exim4-maintainers@lists.alioth.debian.org>
Resent-Date: Sun, 20 Apr 2008 19:36:01 +0000
Resent-Message-ID: <handler.476541.B476541.120872005627398@bugs.debian.org>
X-Debian-PR-Message: followup 476541
X-Debian-PR-Package: exim4-base
X-Debian-PR-Keywords: 
X-Debian-PR-Source: exim4
Received: via spool by 476541-submit@bugs.debian.org id=B476541.120872005627398
          (code B ref 476541); Sun, 20 Apr 2008 19:36:01 +0000
Received: (at 476541) by bugs.debian.org; 20 Apr 2008 19:34:16 +0000
X-Amavis-Spam-Status: No, score=-7.0 required=4.0 tests=BAYES_00,HAS_BUG_NUMBER,
	MURPHY_DRUGS_REL8 autolearn=no 
	version=3.1.4-bugs.debian.org_2005_01_02
Received: from torres.zugschlus.de ([85.214.68.41])
	by rietz.debian.org with esmtp (Exim 4.63)
	(envelope-from <mh+debian-packages@zugschlus.de>)
	id 1JnfIl-00076z-2O; Sun, 20 Apr 2008 19:34:15 +0000
Received: from nechayev.zugschlus.de ([83.246.116.35])
	by torres.zugschlus.de with esmtpsa (TLS-1.0:RSA_AES_256_CBC_SHA1:32)
	(Exim 4.69)
	(envelope-from <mh+debian-packages@zugschlus.de>)
	id 1JnfIj-0001Hx-Gz; Sun, 20 Apr 2008 21:34:13 +0200
Received: from mh by nechayev.zugschlus.de with local (Exim 4.69)
	(envelope-from <mh+debian-packages@zugschlus.de>)
	id 1JnfIa-00005a-R1; Sun, 20 Apr 2008 21:34:04 +0200
Date: Sun, 20 Apr 2008 21:34:04 +0200
From: Marc Haber <mh+debian-packages@zugschlus.de>
To: Justin Pryzby <justinpryzby@users.sourceforge.net>,
	476541@bugs.debian.org, 476541-submitter@bugs.debian.org
Cc: Marc Haber <mh+debian-packages@zugschlus.de>
Message-ID: <20080420193404.GA337@nechayev.zugschlus.de>
References: <20080417124152.GA12812@libra>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20080417124152.GA12812@libra>
User-Agent: Mutt/1.5.17+20080114 (2008-01-14)
Resent-Date: Sun, 20 Apr 2008 19:36:03 +0000
X-Debian-Message: from BTS
X-Rc-Virus: 2007-09-13_01
X-Rc-Spam: 2007-10-04_01
X-Mailing-List: <debian-bugs-dist@lists.debian.org> archive/latest/343752
X-Loop: debian-bugs-dist@lists.debian.org
List-Id: <debian-bugs-dist.lists.debian.org>
List-Post: <mailto:debian-bugs-dist@lists.debian.org>
List-Help: <mailto:debian-bugs-dist-request@lists.debian.org?subject=help>
List-Subscribe: <mailto:debian-bugs-dist-request@lists.debian.org?subject=subscribe>
List-Unsubscribe: <mailto:debian-bugs-dist-request@lists.debian.org?subject=unsubscribe>
Precedence: list
Resent-Sender: debian-bugs-dist-request@lists.debian.org
Received-SPF: none
X-SPF-Guess: pass
X-Spam-Score: -30.5
X-Spam-Report: (-30.5 points, 5.0 required)
	pts rule name              description
	---- ---------------------- --------------------------------------------------
	-50 D_FOR_BOT              For debian-devel-changes bot
	0.0 UNPARSEABLE_RELAY      Informational: message has unparseable relay lines
	-2.6 BAYES_00               BODY: Bayesian spam probability is 0 to 1%
	[score: 0.0000]
	22 AWL                    AWL: From: address is in the auto white-list

On Thu, Apr 17, 2008 at 08:41:52AM -0400, Justin Pryzby wrote:
> That's probably due to very low mail volume on this laptop machine, in
> combination with an earlier logfile rotation.

Please try the following patch against the daily cron job:

--- debian/exim4-base.cron.daily        (revision 2260)
+++ debian/exim4-base.cron.daily        (working copy)
@@ -34,9 +34,12 @@
 # Patches for more sophisticated processing are appreciated via the
 # Debian BTS.

+E4BCD_MAINLOG_NOISE="^[[:digit:][:space:]:-]\{20\}\(\(Start\|End\) queue run: pid=[[:digit:]]\+\|exim [[:digit:]\.]\+ daemon started: pid=[[:digit:]]\+, .*\)$"
+
 if [ -n "$E4BCD_DAILY_REPORT_TO" ]; then
   if [ -x "$(command -v eximstats)" ] && [ -x "$(command -v mail)" ]; then
-    < /var/log/exim4/mainlog eximstats $E4BCD_DAILY_REPORT_OPTIONS \
+    < /var/log/exim4/mainlog grep -v "$E4BCD_MAINLOG_NOISE" \
+                | eximstats $E4BCD_DAILY_REPORT_OPTIONS \
                 | mail $E4BCD_DAILY_REPORT_TO -s"$(hostname --fqdn) Daily email activity report"
   else
     echo "The exim4 cron job is configured to send a daily report, but eximstats"

Greetings
Marc

-- 
-----------------------------------------------------------------------------
Marc Haber         | "I don't trust Computers. They | Mailadresse im Header
Mannheim, Germany  |  lose things."    Winona Ryder | Fon: *49 621 72739834
Nordisch by Nature |  How to make an American Quilt | Fax: *49 621 72739835



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org


