From owner-freebsd-questions Thu Feb 4 07:17:26 1999 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id HAA28385 for freebsd-questions-outgoing; Thu, 4 Feb 1999 07:17:26 -0800 (PST) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from cc942873-a.ewndsr1.nj.home.com (cc942873-a.ewndsr1.nj.home.com [24.2.89.207]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id HAA28378 for ; Thu, 4 Feb 1999 07:17:25 -0800 (PST) (envelope-from cjc@cc942873-a.ewndsr1.nj.home.com) Received: (from cjc@localhost) by cc942873-a.ewndsr1.nj.home.com (8.8.8/8.8.8) id KAA07714; Thu, 4 Feb 1999 10:18:52 -0500 (EST) (envelope-from cjc) From: "Crist J. Clark" Message-Id: <199902041518.KAA07714@cc942873-a.ewndsr1.nj.home.com> Subject: Re: mail to root, or dedicated person In-Reply-To: <36B945B4.AFE1D1BD@sweda.com.hk> from peter kok at "Feb 4, 99 03:01:08 pm" To: peter@sweda.com.hk (peter kok) Date: Thu, 4 Feb 1999 10:18:52 -0500 (EST) Cc: freebsd-questions@FreeBSD.ORG Reply-To: cjclark@home.com X-Mailer: ELM [version 2.4ME+ PL40 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG peter kok wrote, > Hello > > i would like to know how to make 'notifiy mail' > to dedicated person or root > when the system has some problems I am not sure I understand exactly what ''notify mail'' is. I assume you want the system to notify someone via email where there are critical system errors? This can be done with syslog. For example, you could have a line like: *.emerg |mail -s "$HOST EMERGENCY Message" emerg_list Where 'emerg_list' is a alias on the local machine with the email address of the people you want to notify. One caution, now that I think about it, that may not work properly. I don't think syslog will send an EOT to mail. You may need to put some program in front of mail that will read one line of input and then pass it to mail. Then it would look more like, *.emerg |/usr/local/libexec/syslog_mail.sh -s "$HOST EMERGENCY Message" emerg_list If you put it all in a shell script. -- Crist J. Clark cjclark@home.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message