Date: Fri, 22 Dec 2000 11:23:23 -0600 (CST) From: lambert@ssabsd.csw.net To: FreeBSD-gnats-submit@freebsd.org Subject: misc/23766: /etc/periodic/daily/440.status-mailq does not produce output when daily_status_mailq_shorten="YES" is specified Message-ID: <20001222172323.C570313@ssabsd.csw.net> Resent-Message-ID: <200012221730.eBMHU1H88100@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20001222172323.C570313>