[syslog-ng]sending message by email
Nate Campi
nate@campin.net
Fri, 1 Feb 2002 11:17:09 -0800
On Fri, Feb 01, 2002 at 10:43:44AM -0600, Ohrberg, Mick wrote:
> Another method is to create a script called for instance syslog-ng-mail.sh,
> containing
>
> #!/bin/sh
> while read line; do
> echo $line | /usr/bin/mailx -s "$1" $2
> done
>
> ...and then pipe all your matched messages to this script with two arguments
> of the subject and email address to send to. This makes it very generic.
I'd be careful with unchecked alerts over email. See
http://www.campin.net/newlogcheck.html#warning for the reason why,
and a solution.
--
Nate Campi
"Junk mail is war. RFCs do not apply."
-- Wietse Venema