On 2004-02-10T14:37:53+0100, Wilhelm.Greiner@vaps.de wrote:
destination ruf_mich_an { program("/usr/local/sbin/log_to_mail.pl"); }; filter ruf_mich_an2 { facility(cron); }; log { source(net); filter(ruf_mich_an2); destination(ruf_mich_an); };
After restarting syslog-ng with this config, verify that your program is running with ps. It looks like you assumed an exec/fork per event, however the protocol appears to be one event per line. That is, you need logic to decide when you send a chunk of data. I attached the program that I currently use, it is more complicated as I try to both minimize the number of emails sent and the latency in getting them. It dies once in a while, probably because of a unhandled signal, but I need to rewrite it in C++ one of these days. That said, it works quite well. /Allan -- Allan Wind P.O. Box 2022 Woburn, MA 01888-0022 USA