[syslog-ng]Sending mail to root?
nate
syslog-ng@lists.balabit.hu
Mon, 18 Aug 2003 15:30:56 -0700
On Tue, Aug 19, 2003 at 12:20:43AM +0200, Florian Lindner wrote:
> Am Dienstag, 19. August 2003 00:02 schrieb Amodiovalerio Verde:
> >
> > I use some C program I've written to read stdin using a fgets() that return
> > after # bytes or after an EOL.
>
> Could you send this program to me? Wouldn't it be better to return after a
> linebreak?
No need for custom C programs:
http://www.campin.net/syslog-ng/faq.html#external_program
or for shell use this:
#!/bin/sh
while read line; do
echo $line | /usr/bin/mail -s "log alert" pager@example.dom
done
--
Nate
"Classic: A book which people praise and don't read." - Following the
Equator, Pudd'nhead Wilson's New Calendar - Samuel Clemens