OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
Problem with multiple instances

From: Kim Leandersson (kim.leanderssonchs.chalmers.se)
Date: Mon Jan 03 2005 - 11:09:23 CST


Hello!

I recently (a couple of weeks ago) installed an SMTP-gw running Debian
Sarge, Postfix 2.1.4-5, Amavisd-new 20030616p10-4, clamav 0.80-4 and
spamassassin 3.0.1-1. The server is equipped with two interfaces (one
virtual) and two ip addresses from different sub nets. My plan was to
configure two instances of Postfix and make them handle different
domains depending on which instance that answers.

I followed http://advosys.ca/papers/postfix-instance.html in general and
set up different files for relay_domains and transport between the
instances like this.

Some bits from /etc/postfix/main.cf
relay_domains = hash:/etc/postfix/relay_domains
transport_maps = hash:/etc/postfix/transport
alternate_config_directories = /etc/postfix-sec
smtp_bind_address = <ip_address>
inet_interfaces = <address_of_interface>

Some bits from /etc/postfix-sec/main.cf
relay_domains = hash:/etc/postfix-sec/relay_domains
transport_maps = hash:/etc/postfix-sec/transport
inet_interfaces = <address_of_virtual_interface>
smtp_bind_address = <virtual_ip_address>

The problem I have is that my second instance of postfix seems to
disobey my transport table and instead check the DNS for MX records of
the mail. Since the SMTP-GW are in the MX record keeps deliver the mail
to itself until I get to many hops in the log. When this error occured
the first time (during setup) I fixed it by using postmap -c
/etc/postfix-sec transport to create the transport file. But this time
no luck, keeps getting to many hops. I solved it by adding the
information from this transport file to the one in /etc/postfix, so to
me it seems like postmap -c /etc/postfix-sec transport isn't working.

Is there a way to discover which files a certain instance of postfix
uses? Is there a best practice for whis? Should I use different
transport files or one?

//kim