OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
Re: How to distinguish server instances?

From: mouss (usebsdfree.fr)
Date: Sat Sep 02 2006 - 13:20:56 CDT


Heinz Ulrich Stille wrote:
>> but multiple postfix instances (run postfix N times, with different
>> config and queue directories) is far better, since you can use different
>> syslog_name in each postfix. make sure the hostname is different.
>>
>
> But the configuration would just be duplicated, except for that one
> option. That's asking for trouble...
Installing a mail server is asking for trouble ;-p
some benefits of multiple instances:
- separation of roles
- moving an instance to another box is trivial
- less master.cf -o struggle.
- no need for content_filter. you can just use transport_maps. as a result:
- ability to implement per recipient filtering
- different logs. no need to write clever scripts to parse the logs
- ...

and for the mgmt overhead:
> or does the config file have
> "include" functionality?
>
use make to generate config files from "source" config files.

also, if you use maps cleverly, you can get many configs outside of
main.cf. Example:

instance_name = postfix-mx
syslog_name = $instance_name
...
header_checks = pcre:/etc/postfix/header_checks.$instance_name

another thing to do is to write a script to start/stop/$cmd the
instances. some people create different scripts (one for each instance).

> What is special about "syslog_name" anyway? The documentation doesn't
> mention any differences from options that can be set on the command
> line.
>
# postconf -c /etc/postfix/msa -h syslog_name
postfix-msa
# postconf -c /etc/postfix/mx -h syslog_name
postfix-mx
...

# cat /var/log/maillog
...
.... postfix-msa/smtpd[12345]: ...
...
... postfix-mx/smtpd[23456]: ...

# pflogsumm --syslog_name=postfix-msa
...
# pflogsumm --syslog_name=postfix-mx
...

> Apropos documentation: The man-page for lmtp says nexthop should start
> with "unix" or "inet". I had "inet" in my 2.2 config, but 2.3 rejects
> that and wants just the hostname or address...
>