Can postfix use floating IP for outgoing mail? Can a floating IP be added to /etc/network/interfaces?

Posted May 13, 2016 4.1k views

I’ve got DNS records pointing to the floating IP address, but my droplet’s postfix still sends email from the public IP address, resulting in some mail being rejected since the rDNS records do not match up. I have tried to set postfix to use the floating IP address but it doesn’t work, probably because that address isn’t attached to a network interface.

Any way to get postfix to use that floating IP address?

1 comment

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
1 answer

There seem to be multiple problems with using floating IPs for outbound mail:

  1. You cannot set the PTR record for the floating IP
  2. There appears to be no way to route outbound traffic via the floating IP (with iptables or adding a default gw).