Bug 60676

Summary: 150.clean-hoststat doesn't obey mailwrapper
Product: Base System Reporter: Colin Percival <cperciva>
Component: confAssignee: Gregory Neil Shapiro <gshapiro>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Unspecified   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
hoststat.diff none

Description Colin Percival 2003-12-29 05:10:21 UTC
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.
Comment 1 Maxim Konovalov freebsd_committer freebsd_triage 2004-01-02 11:58:19 UTC
Responsible Changed
From-To: freebsd-bugs->gshapiro

Over to Mr. Sendmail.
Comment 2 colin.percival 2004-01-02 12:29:59 UTC
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;;
Comment 3 Gregory Neil Shapiro freebsd_committer freebsd_triage 2004-01-02 18:51:05 UTC
State Changed
From-To: open->patched

The patch (thanks Colin and Maxim) has been applied to the HEAD. 
It will be MFC'ed to RELENG_4 in 4 days.
Comment 4 Gregory Neil Shapiro freebsd_committer freebsd_triage 2004-01-06 17:51:45 UTC
State Changed
From-To: patched->closed

Patch MFC'ed to RELENG_4