Date: Thu, 4 Feb 1999 10:18:52 -0500 (EST) From: "Crist J. Clark" <cjc@cc942873-a.ewndsr1.nj.home.com> To: peter@sweda.com.hk (peter kok) Cc: freebsd-questions@FreeBSD.ORG Subject: Re: mail to root, or dedicated person Message-ID: <199902041518.KAA07714@cc942873-a.ewndsr1.nj.home.com> In-Reply-To: <36B945B4.AFE1D1BD@sweda.com.hk> from peter kok at "Feb 4, 99 03:01:08 pm"
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199902041518.KAA07714>