From owner-cvs-all Mon Nov 26 18:25:43 2001 Delivered-To: cvs-all@freebsd.org Received: from horsey.gshapiro.net (horsey.gshapiro.net [209.220.147.178]) by hub.freebsd.org (Postfix) with ESMTP id 507AF37B41B; Mon, 26 Nov 2001 18:25:30 -0800 (PST) Received: from horsey.gshapiro.net (gshapiro@localhost [IPv6:::1]) by horsey.gshapiro.net (8.12.2.Beta1/8.12.2.Beta1) with ESMTP id fAR2PTgv041097 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Mon, 26 Nov 2001 18:25:29 -0800 (PST) Received: (from gshapiro@localhost) by horsey.gshapiro.net (8.12.2.Beta1/8.12.2.Beta1/Submit) id fAR2PTng041094; Mon, 26 Nov 2001 18:25:29 -0800 (PST) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <15362.63897.444387.12844@horsey.gshapiro.net> Date: Mon, 26 Nov 2001 18:25:29 -0800 From: Gregory Neil Shapiro To: Mike Silbersack Cc: , Subject: Re: cvs commit: src/etc security In-Reply-To: <20011126201427.F30941-100000@achilles.silby.com> References: <15362.63007.449109.47534@horsey.gshapiro.net> <20011126201427.F30941-100000@achilles.silby.com> X-Mailer: VM 6.96 under 21.5 (beta3) "asparagus" XEmacs Lucid Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG >>>>> "silby" == Mike Silbersack writes: silby> On Mon, 26 Nov 2001, Gregory Neil Shapiro wrote: silby> silby 2001/11/26 17:06:57 PST silby> Modified files: silby> etc security silby> Log: silby> Have security add a To: root@host line; the lack of a To: line is causing silby> spambouncer to think my security logs are spam. >> silby> Revision Changes Path silby> 1.58 +2 -1 src/etc/security >> >> Note that root might not actually be getting the mail. From >> /etc/defaults/periodic.conf: >> >> daily_status_security_output="root" # user or /file silby> Hrm, I didn't consider that, and I'm not confident that I can do the sh silby> manipulations necessary to propegate that info down to security. If silby> you can do it, I'd welcome the help. :) I would probably pass the recipient in as an argument. Here is an untested patch. If you can test it, that would be great. If not, let me know and I'll setup a box to try it on. --- 450.status-security~orig Mon Nov 26 18:20:40 2001 +++ 450.status-security Mon Nov 26 18:21:36 2001 @@ -36,6 +36,7 @@ >$daily_status_security_output 2>&1;; *) echo " (output mailed separately)" + args="-t $daily_status_security_output $args" sh /etc/security $args 2>&1 | sendmail $daily_status_security_output;; esac;; --- security~orig Mon Nov 26 18:20:45 2001 +++ security Mon Nov 26 18:23:53 2001 @@ -47,18 +47,19 @@ } sflag=FALSE ignore= -while getopts as c +while getopts ast: c do case "$c" in a) ignore="$ignore|^amd:";; s) sflag=TRUE;; + t) who=OPTARG;; esac done yesterday=`date -v-1d "+%b %e "` host=`hostname` -[ $sflag = FALSE ] && echo "To: root@${host}" +[ "$who" != "" ] && echo "To: ${who}" [ $sflag = FALSE ] && echo "Subject: ${host} security check output" umask 027 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message