From cperciva@fafnir.daemonology.net  Sun Dec 28 21:02:46 2003
Return-Path: <cperciva@fafnir.daemonology.net>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id A231216A4CE
	for <FreeBSD-gnats-submit@freebsd.org>; Sun, 28 Dec 2003 21:02:46 -0800 (PST)
Received: from fafnir.daemonology.net (h24-87-233-42.vc.shawcable.net [24.87.233.42])
	by mx1.FreeBSD.org (Postfix) with SMTP id 2893B43D41
	for <FreeBSD-gnats-submit@freebsd.org>; Sun, 28 Dec 2003 21:02:45 -0800 (PST)
	(envelope-from cperciva@fafnir.daemonology.net)
Received: (qmail 3443 invoked by uid 0); 29 Dec 2003 05:02:49 -0000
Message-Id: <20031229050249.3442.qmail@fafnir.daemonology.net>
Date: 29 Dec 2003 05:02:49 -0000
From: Colin Percival <cperciva@daemonology.net>
Reply-To: Colin Percival <cperciva@daemonology.net>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: 150.clean-hoststat doesn't obey mailwrapper
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         60676
>Category:       conf
>Synopsis:       150.clean-hoststat doesn't obey mailwrapper
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    gshapiro
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Dec 28 21:10:21 PST 2003
>Closed-Date:    Tue Jan 06 09:51:59 PST 2004
>Last-Modified:  Tue Jan 06 09:51:59 PST 2004
>Originator:     Colin Percival
>Release:        FreeBSD 5.2-RC2 i386
>Organization:
>Environment:
System: FreeBSD fafnir.daemonology.net 5.2-RC2 FreeBSD 5.2-RC2 #0: Mon Dec 22 07:23:48 GMT 2003 root@wv1u.freebsd.org:/usr/obj/usr/src/sys/GENERIC i386

>Description:
etc/periodic/daily/150.clean-hoststat calls `sendmail -bh` and
`sendmail -bH`.  This is confusing to non-sendmail MTAs.  It
should call `hoststat -bh` and `purgestat -bH` instead.

>How-To-Repeat:
>Fix:

--- hoststat.diff begins here ---
--- etc/periodic/daily/150.clean-hoststat.orig	Mon Dec 29 04:51:38 2003
+++ etc/periodic/daily/150.clean-hoststat	Mon Dec 29 04:52:08 2003
@@ -14,13 +14,13 @@
 
 case "$daily_clean_hoststat_enable" in
     [Yy][Ee][Ss])
-	if [ -z "$(sendmail -bh 2>&1)" ]; then
+	if [ -z "$(hoststat -bh 2>&1)" ]; then
 	    rc=2
 	else
 	    echo ""
 	    echo "Removing stale entries from sendmail host status cache:"
 	    rc=0
-	    sendmail -bH || rc=1
+	    purgestat -bH || rc=1
 	fi;;
 
     *)  rc=0;;
--- hoststat.diff ends here ---


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->gshapiro 
Responsible-Changed-By: maxim 
Responsible-Changed-When: Fri Jan 2 03:58:19 PST 2004 
Responsible-Changed-Why:  
Over to Mr. Sendmail. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=60676 

From: Colin Percival <colin.percival@wadham.ox.ac.uk>
To: freebsd-gnats-submit@FreeBSD.org
Cc:  
Subject: Re: conf/60676: 150.clean-hoststat doesn't obey mailwrapper
Date: Fri, 02 Jan 2004 12:29:59 +0000

 As pointed out by maxim, the patch should instead be as follows:
 
 --- etc/periodic/daily/150.clean-hoststat.orig	Mon Dec 29 04:51:38 2003
 +++ etc/periodic/daily/150.clean-hoststat	Mon Dec 29 04:52:08 2003
 @@ -14,13 +14,13 @@
 
   case "$daily_clean_hoststat_enable" in
       [Yy][Ee][Ss])
 -	if [ -z "$(sendmail -bh 2>&1)" ]; then
 +	if [ -z "$(hoststat 2>&1)" ]; then
   	    rc=2
   	else
   	    echo ""
   	    echo "Removing stale entries from sendmail host status cache:"
   	    rc=0
 -	    sendmail -bH || rc=1
 +	    purgestat || rc=1
   	fi;;
 
       *)  rc=0;;
 
State-Changed-From-To: open->patched 
State-Changed-By: gshapiro 
State-Changed-When: Fri Jan 2 10:51:05 PST 2004 
State-Changed-Why:  
The patch (thanks Colin and Maxim) has been applied to the HEAD. 
It will be MFC'ed to RELENG_4 in 4 days. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=60676 
State-Changed-From-To: patched->closed 
State-Changed-By: gshapiro 
State-Changed-When: Tue Jan 6 09:51:45 PST 2004 
State-Changed-Why:  
Patch MFC'ed to RELENG_4 

http://www.freebsd.org/cgi/query-pr.cgi?pr=60676 
>Unformatted:
