Assigning Postfix specific ethernet adapter to use

Hi

this is a question that spans a few categories but it is primarily Mailman/Postfix that has me stumped.

G4 server with two ethernet ports [ one built in, one PCI card ] running OS X Server 10.3.9 Unlimited running AFP, web, FTP, Mailman/SMTP. No Firewall / Router side Firewall running.

I want to separate internal network activities from external internet activities so that one port is used for internal network and one port for external network. We have a big mailing list running on the server and I thinking to keep it dumping to and bouncing from the outside world via the " external use " port.

Is this doable?

Have checked the FAQs and read a few of the manuals but don't see where it tell us how or if OS X load balances across ethernet ports other than in Firewall set ups.

I guess there must be a manual hack to point SMTP to one en address?

looking at ;

" /etc/postfix/main.cf "

there is a line

" inet_interfaces = all "

but this does not seem to provide the right answer.

Niether does " /etc/postfix/master.cf "

Any pointers? If the answer is I am wasting my time just let it be, fair enough. If there is documentation on how to determine which posts any other / all services use I am also interested.

Thanks in advance.

Posted on Oct 5, 2005 7:58 AM

Reply
5 replies

Oct 5, 2005 8:09 AM in response to JonAllen

We have a big mailing list running on the server and I thinking to keep it dumping to and bouncing from the outside world via the " external use " port.


Sorry don't get you. What is it you want to achieve? Is the mailing list "internal", "external" or both?

inet_interface


Specifies the IP addresses postfix smtp listens too. If you specify only one (not loopback) address than this is the one postfix will use for outgoing smtp.

Any pointers?


http://www.postfix.org/postconf.5.html

Alex

Oct 5, 2005 8:25 AM in response to pterobyte

Sorry don't get you. What is it you want to achieve?
Is the mailing list "internal", "external" or both?


the mailing list is used both internally and externally.

What I want to achieve is that all internal traffic to and from the server [ e.g. AFP ] goes through one ethernet port, e.g. en0 or 192.168.1.2; and all the external traffic [ e.g. SMTP, FTP, web ] goes through the other port en1 or 192.168.1.3.

I can control what comes in from the outside world to which port via the router [ e.g. all traffic to en1 or 192.168.1.3 ]. Fair enough.

But how can I control which en port OS X Server uses to send out [ e.g. SMTP primarily, others out of interest ].

Thank for your quick reply, hope that clarifies.

Oct 5, 2005 8:40 AM in response to JonAllen

Hi

looking at ;

http://www.postfix.org/postconf.5.html#inet_interfaces

it looks like this is where it might be done. But has anyone done this? It is not clear to me and experience with Apple's implimentation of Mailman in the past make me shy of hacking away merrily on OSS.

[quote]
The network interface addresses that this mail system receives mail on. Specify "all" to receive mail on all network interfaces (default), and "loopback-only" to receive mail on loopback network interfaces only (Postfix 2.2 and later). The parameter also controls delivery of mail to user@[ip.address].

Note 1: you need to stop and start Postfix when this parameter changes.

Note 2: address information may be enclosed inside [], but this form is not recommended here.

When inet_interfaces specifies just one IPv4 and/or IPv6 address that is not a loopback address, the Postfix SMTP client will use this address as the IP source address for outbound mail. Support for IPv6 is available in Postfix version 2.2 and later.

On a multi-homed firewall with separate Postfix instances listening on the "inside" and "outside" interfaces, this can prevent each instance from being able to reach servers on the "other side" of the firewall. Setting smtp bindaddress to 0.0.0.0 avoids the potential problem for IPv4, and setting smtp bindaddress6 to :: solves the problem for IPv6.

A better solution for multi-homed firewalls is to leave inet_interfaces at the default value and instead use explicit IP addresses in the master.cf SMTP server definitions. This preserves the SMTP client's loop detection, by ensuring that each side of the firewall knows that the other IP address is still the same host. Setting $inet_interfaces to a single IPv4 and/or IPV6 address is primarily useful with virtual hosting of domains on secondary IP addresses, when each IP address serves a different domain (and has a different $myhostname setting).

See also the proxy_interfaces parameter, for network addresses that are forwarded to Postfix by way of a proxy or address translator.

Examples:

inet_interfaces = all (DEFAULT)
inet_interfaces = loopback-only (Postfix 2.2 and later)
inet_interfaces = 127.0.0.1
inet_interfaces = 127.0.0.1, [::1] (Postfix 2.2 and later)
inet_interfaces = 192.168.1.2, 127.0.0.1
[/quote]

Oct 15, 2005 10:21 PM in response to JonAllen

OK,

I worked this out via the Postfix FAQs,

The answer is in /etc/postfix/main.cf and at the line ;

inet_interfaces = all

change this to ;

e.g. inet_interfaces = 192.168.1.3

Instead of all, which is the Apple default, put the IP address of the ethernet interface you want and reload Postfix afterwards. This works fine. Postfix will listen on that IP address only.

What I chose to do was run all the external traffic to this server to one port and leave the builtin ethernet interface for internal traffic. Works fine.

Any comments on this set up?

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Assigning Postfix specific ethernet adapter to use

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.