[syslog-ng]Sending a log line via e-mail
Loïc Minier
syslog-ng@lists.balabit.hu
Wed, 27 Oct 2004 11:29:07 +0200
Csehi Andras <acsehi@qsoft.hu> - Wed, Oct 27, 2004:
> destination d_ups { program("mail -s UPSlog acsehi@qsoft.hu"); };
program() destination launches a program when syslog-ng starts and
sends the log lines on its stdin. the program is not launched for each
line.
you can write a shell script or an awk / perl program to read stdin
and call mail for each line, this would translate in shell to:
while read line; do echo "$line" | mail -s UPSlog acsehi@qsoft.hu; done
--
Loïc Minier <lool@dooz.org>