[syslog-ng] qmail.

Balazs Scheidler bazsi@balabit.hu
Sat, 13 Nov 1999 10:44:40 +0100


On Fri, Nov 12, 1999 at 11:44:14PM -0800, Jacob Zehnder wrote:
> ahoy,
> 
> i recently switched to syslog-ng and am loving it, though im having one
> small problem.  i use qmail and am logging it like this
> 
> destination qmail {
>    file ("/var/log/maillog" compress(on) sync(0) log_fifo_size(10));
> };
> 
> it logs fine to /var/log/maillog.. only problem is it also wont stop
> logging to /var/log/messages.  i was wondering if theres a way i can
> restrict qmails access to /var/log/messages in syslog-ng without having to
> do some knarly perm changes :>

As I understand you would qmail to log into /var/log/maillog, and not log
into /var/log/messages. You'll need two filters to do this:

filter f_qmail { facility(mail); };
filter f_messages { not facility(mail); };

log { source(src); filter(f_qmail); destination(d_qmail); };
log { source(src); filter(f_messages); destination(d_messages); };

I may add a filter function to call another filter in the future (like
filter f_messages { not filter(q_mail); };)

-- 
Bazsi
PGP info: KeyID 9AF8D0A9 Fingerprint CD27 CFB0 802C 0944 9CFD 804E C82C 8EB1
     url: http://www.balabit.hu/pgpkey.txt