Web Hosting Talk







View Full Version : Running Postfix on a machine with two virtual interfaces


ridlo
07-19-2004, 07:57 PM
My situation is this:

I currently have a block of 8 IP addresses courtesy of my ISP. This machine is a colocation environment, etc.

I have all of the hosted sites running off (pointing to, I should say)
ip.add.01 (eth0)

I have a customer who is using another one of my IPs (ip.add.02, eth0:0) , dedicated to his site only.

Everything works fine in Apache of course, using virtual interfaces, et al. However, the problem resides with mail. We are using Postfix. You may see where this is going already - when user@customerwebsite.com has email sent to him, DNS turns the domain name to the IP address (ip.add.02), but Postfix doesn't see it, so mail just floats around for this user until it returned sender via their mailer.

My question is this:

Can I get Postfix to handle both of the interfaces (eth0 and eth0:0)?

DNS resolves the domain to their dedicated IP address, so that is where the mail is being sent - but there is no mailer, etc to pick it up since postfix is only listening on eth0. Any one have any ideas?

Thanks.

sigma
07-19-2004, 08:07 PM
Either give the customer's domain an MX record that points to your server's main IP address, or ensure that Postfix listens on the other IPs by using its inet_interfaces configuration parameter. I believe you want:

inet_interfaces = all

in /etc/postfix/main.cf

Kevin

ridlo
07-20-2004, 02:33 AM
Rock and roll, thanks!