From owner-freebsd-bugs@FreeBSD.ORG Fri May 9 12:10:01 2008 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EDAC2106567B for ; Fri, 9 May 2008 12:10:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id C17DF8FC23 for ; Fri, 9 May 2008 12:10:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m49CA1iq048683 for ; Fri, 9 May 2008 12:10:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m49CA1ss048682; Fri, 9 May 2008 12:10:01 GMT (envelope-from gnats) Resent-Date: Fri, 9 May 2008 12:10:01 GMT Resent-Message-Id: <200805091210.m49CA1ss048682@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Frank Behrens Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2FDDC1065682 for ; Fri, 9 May 2008 12:02:32 +0000 (UTC) (envelope-from frank@pinky.sax.de) Received: from post.frank-behrens.de (post.frank-behrens.de [82.139.255.138]) by mx1.freebsd.org (Postfix) with ESMTP id 79E4C8FC20 for ; Fri, 9 May 2008 12:02:31 +0000 (UTC) (envelope-from frank@pinky.sax.de) Received: from pinky.frank-behrens.de (post.frank-behrens.de [82.139.255.138]) by post.frank-behrens.de (8.14.2/8.14.2) with ESMTP-IPv4 id m49BqHJM042748 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 9 May 2008 13:52:17 +0200 (CEST) (envelope-from frank@pinky.sax.de) Received: from moon.behrens (localhost [127.0.0.1]) by pinky.frank-behrens.de (8.14.2/8.14.2) with ESMTP-MSA id m49BqGpv042744 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Fri, 9 May 2008 13:52:16 +0200 (CEST) (envelope-from frank@moon.behrens) Received: (from frank@localhost) by moon.behrens (8.14.2/8.14.2/Submit) id m49BqGlr042743; Fri, 9 May 2008 13:52:16 +0200 (CEST) (envelope-from frank) Message-Id: <200805091152.m49BqGlr042743@moon.behrens> Date: Fri, 9 May 2008 13:52:16 +0200 (CEST) From: Frank Behrens To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: conf/123551: [patch] /etc/periodic/daily/440.status-mailq should also print quarantined and lost queue entries X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 May 2008 12:10:02 -0000 >Number: 123551 >Category: conf >Synopsis: [patch] /etc/periodic/daily/440.status-mailq should also print quarantined and lost queue entries >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Fri May 09 12:10:00 UTC 2008 >Closed-Date: >Last-Modified: >Originator: Frank Behrens >Release: FreeBSD 7.0-BETA4-200712071613 i386 >Organization: >Environment: >Description: The sendmail default mail queue can contain the following message types: normal mails, quarantined mails and lost mails - see mailq(1). The periodic status scripts prints only the 1st message type (normal messages). To keep informed about quarantined and lost messages the other message entries should be printed, too. The attached patch implemements the output for quaratined and lost messages in a similar manner as it was done for the client submission queue. >How-To-Repeat: Quarantine a message in sendmail, e.g. via a milter program. The default periodic script does not inform about such message. >Fix: --- periodic_mailq_quarantine.patch begins here --- --- etc/periodic/daily/440.status-mailq.orig 2007-12-08 18:09:45.000000000 +0100 +++ etc/periodic/daily/440.status-mailq 2008-05-09 13:25:38.000000000 +0200 @@ -58,6 +58,46 @@ [ $rc_submit -gt 0 ] && rc=1 fi;; esac + + case "$daily_status_include_quarantine_mailq" in + [Yy][Ee][Ss]) + echo "" + echo "Mail in quarantine queue:" + + rc_submit=$(case "$daily_status_mailq_shorten" in + [Yy][Ee][Ss]) + mailq -qQ | + egrep -e '^[[:space:]]+[^[:space:]]+@' | + sort | + uniq -c | + sort -nr | + awk '$1 >= 1 {print $1, $2}';; + *) + mailq -qQ;; + esac | tee /dev/stderr | + egrep -v '(mqueue is empty|Total requests)' | wc -l) + [ $rc_submit -gt 0 ] && rc=1 + esac + + case "$daily_status_include_lost_mailq" in + [Yy][Ee][Ss]) + echo "" + echo "Mail in lost queue:" + + rc_submit=$(case "$daily_status_mailq_shorten" in + [Yy][Ee][Ss]) + mailq -qL | + egrep -e '^[[:space:]]+[^[:space:]]+@' | + sort | + uniq -c | + sort -nr | + awk '$1 >= 1 {print $1, $2}';; + *) + mailq -qL;; + esac | tee /dev/stderr | + egrep -v '(mqueue is empty|Total requests)' | wc -l) + [ $rc_submit -gt 0 ] && rc=1 + esac fi;; *) rc=0;; --- etc/defaults/periodic.conf.orig 2007-12-08 18:09:00.000000000 +0100 +++ etc/defaults/periodic.conf 2008-05-09 13:21:01.000000000 +0200 @@ -119,6 +119,8 @@ daily_status_mailq_enable="YES" # Check mail status daily_status_mailq_shorten="NO" # Shorten output daily_status_include_submit_mailq="YES" # Also submit queue +daily_status_include_quarantine_mailq="YES" # Also quarantine queue +daily_status_include_lost_mailq="YES" # Also lost queue # 450.status-security daily_status_security_enable="YES" # Security check --- periodic_mailq_quarantine.patch ends here --- >Release-Note: >Audit-Trail: >Unformatted: