On Tue, Jul 10, 2012 at 10:32:39AM +0200, Leo Baltus wrote:
> Op 09/07/2012 om 13:52:04 -0400, schreef Wietse Venema:
> > Leo Baltus:
> > > I would like postfix to not log to the default syslog-daemon to
> > > have better control over where each specific postfix instance logs to. I
> > > am running multiple instances on a server.
> >
> > Postfix has syslog_facility to split different syslog streams.
>
> syslog facilities are quite limited, only 24 of which only 8 local.
>
There may be more options...
>From the syslog.conf man page on FreeBSD:
Each block of lines is separated from the previous block by a program or
hostname specification. A block will only log messages corresponding to
the most recent program and hostname specifications given. Thus, with a
block which selects `ppp' as the program, directly followed by a block
that selects messages from the hostname `dialhost', the second block will
only log messages from the ppp(8) program on dialhost.
A program specification is a line beginning with `#!prog' or `!prog' (the
former is for compatibility with the previous syslogd, if one is sharing
syslog.conf files, for example) and the following blocks will be associ-
ated with calls to syslog(3) from that specific program. A program spec-
ification for `foo' will also match any message logged by the kernel with
the prefix `foo: '. The `#!+prog' or `!+prog' specification works just
like the previous one, and the `#!-prog' or `!-prog' specification will
match any message but the ones from that program. Multiple programs may
be listed, separated by commas: `!prog1,prog2' matches messages from
either program, while `!-prog1,prog2' matches all messages but those from
`prog1' or `prog2'.
So, perhaps that combined with "-o syslog_name=postfixinstanceX"
could allow you to get your syslog streams split. I have not tested.
Your syslogd may or may not have that functionality.
Otherwise, use something like FreeBSD's Jail and run each instance
in a different jail with a different syslog daemon.
--
Scott Lambert KC5MLE Unix SysAdmin
[email protected]