From owner-freebsd-bugs Fri Dec 22 9:30: 8 2000 From owner-freebsd-bugs@FreeBSD.ORG Fri Dec 22 09:30:01 2000 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id B76DF37B402 for ; Fri, 22 Dec 2000 09:30:01 -0800 (PST) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.1/8.11.1) id eBMHU1H88100; Fri, 22 Dec 2000 09:30:01 -0800 (PST) (envelope-from gnats) Resent-Date: Fri, 22 Dec 2000 09:30:01 -0800 (PST) Resent-Message-Id: <200012221730.eBMHU1H88100@freefall.freebsd.org> Resent-From: gnats-admin@FreeBSD.org (GNATS Management) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: gnats-admin@FreeBSD.org, lambert@ssabsd.csw.net Received: from ssabsd.csw.net (ssabsd.csw.net [209.136.201.12]) by hub.freebsd.org (Postfix) with ESMTP id C2B4E37B400 for ; Fri, 22 Dec 2000 09:23:51 -0800 (PST) Received: by ssabsd.csw.net (Postfix, from userid 1002) id C570313; Fri, 22 Dec 2000 11:23:23 -0600 (CST) Message-Id: <20001222172323.C570313@ssabsd.csw.net> Date: Fri, 22 Dec 2000 11:23:23 -0600 (CST) From: lambert@ssabsd.csw.net Reply-To: lambert@ssabsd.csw.net To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.2 Subject: misc/23766: /etc/periodic/daily/440.status-mailq does not produce output when daily_status_mailq_shorten="YES" is specified Resent-Sender: gnats@FreeBSD.org Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >Number: 23766 >Category: misc >Synopsis: /etc/periodic/daily/440.status-mailq does not produce output when daily_status_mailq_shorten="YES" is specified >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Fri Dec 22 09:30:01 PST 2000 >Closed-Date: >Last-Modified: >Originator: Scott Lambert >Release: FreeBSD 4.2-RELEASE i386 >Organization: CSW Net, Inc. >Environment: FreeBSD ssabsd.csw.net 4.2-RELEASE FreeBSD 4.2-RELEASE #0: Tue Nov 21 13:43:32 CST 2000 lambert@ssabsd.csw.net:/usr/obj/usr/src/sys/SSABSD i386 >Description: I am not seeing any output from /etc/periodic/daily/440.status-mailq (v. 1.4.2.2) when I try to use the short form output by specifying daily_status_mailq_shorten="YES" in /etc/periodic.conf. Also, no output is produced if only one message to each uniq recipient is in the mailq. I think this give a false warm fuzzy to the admin. So I think it would be a good idea to have the number of messages before the awk script produces output configurable. >How-To-Repeat: With multiple e-mails to the same recipient in your mailq run: echo 'daily_status_mailq_shorten="YES"' >> /etc/periodic.conf sh /etc/periodic/daily/440.status-mailq >Fix: This is probably not the right fix but it works here and I do not know enough to produce anything better at this time. *** 440.status-mailq.orig Fri Dec 15 10:36:47 2000 --- 440.status-mailq Fri Dec 15 10:41:50 2000 *************** *** 34,40 **** sort | uniq -c | sort -nr | ! awk '$1 > 1 {print $1, $2}');; *) mailq;; esac | tee /dev/stderr | fgrep -v 'mqueue is empty' | wc -l) --- 34,41 ---- sort | uniq -c | sort -nr | ! awk "\$1 > $daily_mailq_shorten_min {print \$1, \$2}"); ! echo "$rc";; *) mailq;; esac | tee /dev/stderr | fgrep -v 'mqueue is empty' | wc -l) *** periodic.conf.dist Fri Dec 15 12:47:52 2000 --- periodic.conf Fri Dec 15 12:49:45 2000 *************** *** 106,111 **** --- 106,114 ---- # 440.status-mailq daily_status_mailq_enable="YES" # Check mail status daily_status_mailq_shorten="NO" # Shorten output + daily_mailq_shorten_min=1 # Number of uniq addrs + # in output must be > + # this number # 450.status-security daily_status_security_enable="YES" # Security check >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message