OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
Re: Postfix 2nd instance separate logs

From: Alex van den Bogaerdt (alexergens.op.het.net)
Date: Wed May 21 2003 - 10:21:29 CDT


On Wed, May 21, 2003 at 02:40:14PM +0100, Simon Crowther wrote:

> >localhost:1025 inet n - n - - smtpd -o syslog_name=outbound
> >

> This left me with some Qns,
>
> 1, is the master.cf the correct place to define either the syslog_name
> or syslog_facility?

That depends. In above example, think of "syslog_name=outbound" as
an override for the "global" name. It is only valid for that
specific listener on port 1025 of interface localhost.

> 2, Which daemons in the master.cf require the setting?

None. The "global" name for this instance is set in main.cf,
or you can leave it to the default.

> 3, given that I have one instance in /etc/postfix and one in
> /etc/postfix-inbound, listening on separate IP's,
> how can I best separate mail logging to /var/log/mailout.log (for
> /etc/postfix) and /var/log/mailin.log (for /etc/postfix-inbound)?

Set the name in main.cf, this way all components will use the
same name.

> 4, in my syslog, mail.crit, mail.debug & mail.info all go to different
> locations. how can I best get them into one log per instance? (in
> keeping with the above)

You could use another facility, such as LOCAL0, for the second
instance using "syslog_facility = local0". This can be written
to its own file by specifying this in /etc/syslog.conf

> My current /etc/syslog.conf

[snip]

> mail.info /var/log/mail.log

  local0.info /var/log/inboundmail.log

(and similar entries for the other lines)

cheers,
Alex