[syslog-ng]Sending mail to root?

Achim Gsell syslog-ng@lists.balabit.hu
Tue, 2 Sep 2003 22:02:28 +0200


On Tuesday 02 September 2003 21:18, Florian Lindner wrote:

> > Try something like the definition below and read the manual!
> >
> > destination d_mailroot {
> >         program("/root/bin/sendline.sh"
> >                 template("$DATE $HOST [$FACILITY.$LEVEL] $MSG\n")
> >                 template_escape(no)
> >         );
> > };
>
> Thanks, it works.
> But is also possible to use templates as the program? So that I can give
> $LEVEL as a parameter to sendline.sh?
> Thanks,
> Florian

No. This make no sense because the program is *not* called for every single 
message and it is not a good idea to exit the program after one message is 
processed. The program will be started once and has to read the messages from 
stdin.

Achim