[syslog-ng]Sending mail to root?
Amodiovalerio Verde
syslog-ng@lists.balabit.hu
Tue, 19 Aug 2003 00:02:50 +0200
You simply cannot use a destination like that one.
Remember that syslog-ng never stop feeding destinations, so there is never
an EOF...
What you can do is a script or a little program that read it's stdin and
without waiting for an EOF, do something.
I use some C program I've written to read stdin using a fgets() that return
after # bytes or after an EOL.
You have to use something like that using language you like.
But never expect syslog-ng to close your destination stdin, cause it's not
its behaviour.
Amodiovalerio Verde
----- Original Message -----
From: "Florian Lindner" <mailinglists@xgm.de>
To: <syslog-ng@lists.balabit.hu>
Sent: Monday, August 18, 2003 11:51 PM
Subject: [syslog-ng]Sending mail to root?
> Hello,
> I try to define a destination which sends the log entry to root:
>
> destination d_mailroot { program("/usr/bin/mail -s '[syslog] Exception
> detected' root"); };
>
> But this is not working. mail does not notice that it should close stdin
and
> send the mail. I think something like a EOF or at least in single line
with a
> dot.
> How can I accomplish sending the mail?
> Thanks,
> Florian
>
> _______________________________________________
> 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
>