[syslog-ng]Sending mail to root?
Amodiovalerio Verde
syslog-ng@lists.balabit.hu
Tue, 19 Aug 2003 01:08:44 +0200
Well, with that script you will receive a mail for each line in
stdin...that's a pain...
if you write a custum script you could manage things better....like sending
a mail with an alert and the number of times
it repeated...
I don't like to have my mailbox filled with the same message....
I'll post something in here as soon as I came back in office (
september )...
I'm on holiday now.
Amodiovalerio Verde
----- Original Message -----
From: "nate" <nate@campin.net>
To: <syslog-ng@lists.balabit.hu>
Sent: Tuesday, August 19, 2003 12:30 AM
Subject: Re: [syslog-ng]Sending mail to root?
> 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
>
> _______________________________________________
> syslog-ng maillist - syslog-ng@lists.balabit.hu
> https://lists.balabit.hu/mailman/listinfo/syslog-ng
> Frequently asked questions at http://www.campin.net/syslog-ng/faq.html
>