[syslog-ng]Some missunderstanding in filter

Serge Leschinsky fish@artlife.tomsknet.ru
Wed, 19 Jun 2002 12:58:30 +0700


------------67189A4449D6F2
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Dear sirs.

I'm newbie in syslog-ng therefore I beg you to treat my question with
indulgence if it is primitive. I'm very sorry for an attached conf but
I think I can't explain my problem without this.

I have linux (RH) box with syslog-ng-1.4.10 (it's some outdated package
but I haven't enough knowledge for its rebuilding).

My problem is following:
the log from MTA comes to /var/log/messages. So I have duplicate MTA
log in mail.log and messages.
 As far as I understand the problem point is in following filters:
> filter f_messages { level(info, emerg, debug, notice, warn, crit, err); };
>log { source(src); filter(f_messages); destination(messages); };

There was an attempt to "log anything (except mail) of level info or
higher". But mail is logging to /var/log/messages anyway. How should I
modify the filters for resolving this?

I will be very appreciate for your kind help.

-- 
Yours sincerely
      Serge Leschinsky          mailto:fish@artlife.tomsknet.ru          

Wednesday, June 19, 2002  
------------67189A4449D6F2
Content-Type: application/octet-stream; name="syslog-ng.conf"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="syslog-ng.conf"

IwojIFN5c2xvZy1uZyAgY29uZmlndXJhdGlvbiBmb3IgZm9yIERlYmlhbiBHTlUvTGludXgKIwoj
IENvcHlyaWdodCAoYykgMTk5OSBhbm9ueW1vdXMKIyBDb3B5cmlnaHQgKGMpIDE5OTkgQmFsYXpz
IFNjaGVpZGxlcgojICRJZDogc3lzbG9nLW5nLmNvbmYuc2FtcGxlLHYgMS4yIDE5OTkvMTEvMTUg
MTI6MzA6NDEgYmF6c2kgRXhwICQKIwojIFN5c2xvZy1uZyBjb25maWd1cmF0aW9uIGZpbGUsIGNv
bXBhdGlibGUgd2l0aCBkZWZhdWx0IERlYmlhbiBzeXNsb2dkCiMgaW5zdGFsbGF0aW9uLiAKIwoK
IyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMj
Iy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