From kheuer@gwdu60.gwdg.de  Wed May 16 00:20:02 2001
Return-Path: <kheuer@gwdu60.gwdg.de>
Received: from gwdu60.gwdg.de (gwdu60.gwdg.de [134.76.98.60])
	by hub.freebsd.org (Postfix) with ESMTP id 10DEF37B42C
	for <FreeBSD-gnats-submit@freebsd.org>; Wed, 16 May 2001 00:20:01 -0700 (PDT)
	(envelope-from kheuer@gwdu60.gwdg.de)
Received: (from kheuer@localhost)
	by gwdu60.gwdg.de (8.11.3/8.9.3) id f4G7Jxl16086;
	Wed, 16 May 2001 09:19:59 +0200 (CEST)
	(envelope-from kheuer)
Message-Id: <200105160719.f4G7Jxl16086@gwdu60.gwdg.de>
Date: Wed, 16 May 2001 09:19:59 +0200 (CEST)
From: kheuer@gwdg.de
Reply-To: kheuer@gwdg.de
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: /usr/sbin/periodic does not set mail subject correctly
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         27375
>Category:       bin
>Synopsis:       /usr/sbin/periodic does not set mail subject correctly
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    brian
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed May 16 00:30:01 PDT 2001
>Closed-Date:    Wed May 16 02:19:09 PDT 2001
>Last-Modified:  Wed May 16 02:38:49 PDT 2001
>Originator:     kheuer@gwdg.de
>Release:        FreeBSD 4.3-STABLE i386
>Organization:
GWDG
>Environment:
System: FreeBSD gwdu60.gwdg.de 4.3-STABLE FreeBSD 4.3-STABLE #1: Mon May 14 15:54:42 CEST 2001 kheuer@gwdu57.gwdg.de:/usr/obj/usr/src/sys/GWDU60 i386
>Description:
	Formerly, the scripts run periodically (daily, weekly, monthly)
	sent mail to root with a subject line containing host name
	and script name (daily, weekly, monthly).
	This is extremly useful when forwarding this mail messages from
	different hosts to one address.
	Now (I guess at less since 4.2) the mail does not contain
	a subject line.
>How-To-Repeat:
	Look at the daily mail or run one of the peridioc commands in
	/etc/crontab, e.g.:
	periodic daily 2>&1 | sendmail root
>Fix:

*** /usr/sbin/periodic  Wed May 16 08:57:10 2001
--- /usr/src/usr.sbin/periodic/periodic.sh      Mon Dec 11 10:25:36 2000
***************
*** 39,45 ****
      eval output=\$${arg##*/}_output
      case "$output" in
      /*) pipe="cat >>$output";;
!     "") echo "Subject: $host $arg run output"; pipe=cat;;
      *)  pipe="mail -s '$host ${arg##*/} run output' $output";;
      esac
  
--- 39,45 ----
      eval output=\$${arg##*/}_output
      case "$output" in
      /*) pipe="cat >>$output";;
!     "") pipe=cat;;
      *)  pipe="mail -s '$host ${arg##*/} run output' $output";;
      esac
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->brian 
Responsible-Changed-By: dwmalone 
Responsible-Changed-When: Wed May 16 01:53:14 PDT 2001 
Responsible-Changed-Why:  
Brain made the change to the redirection. 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=27375 
State-Changed-From-To: open->closed 
State-Changed-By: brian 
State-Changed-When: Wed May 16 02:19:09 PDT 2001 
State-Changed-Why:  
The submitter needs to update his crontab file.  The periodic scripts 
should no longer be piped into sendmail (since September 2000) 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=27375 
>Unformatted:
