From hsu@mail.clinet.fi  Sun Nov  2 17:37:14 1997
Received: from hauki.clinet.fi (root@hauki.clinet.fi [194.100.0.1])
          by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id RAA25259
          for <FreeBSD-gnats-submit@freebsd.org>; Sun, 2 Nov 1997 17:37:10 -0800 (PST)
          (envelope-from hsu@mail.clinet.fi)
Received: from katiska.clinet.fi (katiska.clinet.fi [194.100.0.4])
	by hauki.clinet.fi (8.8.7/8.8.6) with ESMTP id DAA14022
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 3 Nov 1997 03:37:06 +0200 (EET)
Received: (root@localhost) by katiska.clinet.fi (8.8.7/8.6.4) id DAA03090; Mon, 3 Nov 1997 03:37:05 +0200 (EET)
Message-Id: <199711030137.DAA03090@katiska.clinet.fi>
Date: Mon, 3 Nov 1997 03:37:05 +0200 (EET)
From: Heikki Suonsivu <hsu@mail.clinet.fi>
Reply-To: hsu@mail.clinet.fi
To: FreeBSD-gnats-submit@freebsd.org
Subject: /etc/daily should use full hostname
X-Send-Pr-Version: 3.2

>Number:         4924
>Category:       bin
>Synopsis:       /etc/daily should use full hostname
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sun Nov  2 17:40:01 PST 1997
>Closed-Date:    Tue Apr 14 14:51:08 PDT 1998
>Last-Modified:  Tue Apr 14 14:54:03 PDT 1998
>Originator:     Heikki Suonsivu
>Release:        FreeBSD 2.2-STABLE i386
>Organization:
Clinet, Espoo, Finland
>Environment:

FreeBSD (apparently any version?)

>Description:

/etc/daily sends daily mails with subject "$host daily run output", and
$host comes from

host=`hostname -s`

This gives only one component of the host name.  In large organisations
there may be conflicting names like

foo.department-a.com
foo.department-b.com

and thus differentiating between these two requires looking at mail
headers.

>How-To-Repeat:

Manage network of large organization for some time.

(Another matter is that FreeBSD daily/security scripts are horribly too
noisy, most of them announcing no useful information, ie. nothing has
happened.  Don't tell me that it is intentional, noone can keep manually
track of whether one of the 70 machines failed to send its spam tonight.
Anyone have tools to summarize daily mails already ?)

>Fix:

I think most people have hostname set to full name, so using -s for
hostname could be removed.


*** etc/daily.orig	Mon Nov  3 03:27:45 1997
--- etc/daily	Mon Nov  3 03:28:02 1997
***************
*** 3,9 ****
  #	@(#)daily	5.12 (Berkeley) 5/24/91
  #
  PATH=/bin:/usr/bin:/sbin:/usr/sbin
! host=`hostname -s`
  echo "Subject: $host daily run output"
  bak=/var/backups
  
--- 3,9 ----
  #	@(#)daily	5.12 (Berkeley) 5/24/91
  #
  PATH=/bin:/usr/bin:/sbin:/usr/sbin
! host=`hostname`
  echo "Subject: $host daily run output"
  bak=/var/backups
  


>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: danny 
State-Changed-When: Tue Apr 14 14:51:08 PDT 1998 
State-Changed-Why:  
The issue affects few people, and the fix is cosmetic and 
easily applied locally where required. 
>Unformatted:
