From: Patrick Chemla on
Hi,

I am running a smtp relay for different domains, and I want to separate
all traffic.

I would like to bind for each domain the same IP address to receive and
send messages, and it should be for each domain its own public IP address.

I understand that with postfix 2.7.0 multi-instances feature I can
handle separate inbound queues on one system, so each queue can have its
own IP address, but what about the outbound messages ?

When users will post messages to relay outside, will the sending process
bind the output on the same IP interface from where it got the message?
I wonder it will be routed according to the route table through the
default interface.

Is there a way to send through separate interfaces ?

Thanks for help
Patrick

From: Mihira Fernando on
On Sun, 25 Apr 2010 09:08:22 +0300
Patrick Chemla <patrick.chemla(a)perfaction.net> wrote:

> Hi,
>
> I am running a smtp relay for different domains, and I want to
> separate all traffic.
>
> I would like to bind for each domain the same IP address to receive
> and send messages, and it should be for each domain its own public IP
> address.
>
> I understand that with postfix 2.7.0 multi-instances feature I can
> handle separate inbound queues on one system, so each queue can have
> its own IP address, but what about the outbound messages ?
>
> When users will post messages to relay outside, will the sending
> process bind the output on the same IP interface from where it got
> the message? I wonder it will be routed according to the route table
> through the default interface.
>
> Is there a way to send through separate interfaces ?
>
> Thanks for help
> Patrick

For each instance, set the smtp_bind_address to the desired IP.

see http://www.postfix.org/postconf.5.html#smtp_bind_address for
details.

Mihira.

From: Wietse Venema on
Mihira Fernando:
> On Sun, 25 Apr 2010 09:08:22 +0300
> Patrick Chemla <patrick.chemla(a)perfaction.net> wrote:
>
> > Hi,
> >
> > I am running a smtp relay for different domains, and I want to
> > separate all traffic.
> >
> > I would like to bind for each domain the same IP address to receive
> > and send messages, and it should be for each domain its own public IP
> > address.
> >
> > I understand that with postfix 2.7.0 multi-instances feature I can
> > handle separate inbound queues on one system, so each queue can have
> > its own IP address, but what about the outbound messages ?
> >
> > When users will post messages to relay outside, will the sending
> > process bind the output on the same IP interface from where it got
> > the message? I wonder it will be routed according to the route table
> > through the default interface.
> >
> > Is there a way to send through separate interfaces ?
> >
> > Thanks for help
> > Patrick
>
> For each instance, set the smtp_bind_address to the desired IP.
>
> see http://www.postfix.org/postconf.5.html#smtp_bind_address for
> details.

Since these instances also receive mail, you will need to set
the following in main.cf:

myhostname also supplies the default for smtp_helo_name
and a lot of other things.

inet_interfaces required for mail loop detection, and for
some of the finer details of SMTP.

proxy_interfaces required if inet_interfaces contains
a non-routable address such as 192.168.

These are required besides the settings that all MTA instances need:

myorigin, mydestination

Wietse