Learn Changing Postfix Outbound IP Address

March 28, 2019

Table of Contents

When a server has more than one IP address assigned to it, Postfix randomly selects an IP address for outbound emails. This default Postfix behavior can result in emails being listed as spam due to the sending IP not matching the IP address to which the server hostname is resolving.

The solution is to bind Postfix to the server’s primary IP, or the IP to which the server’s hostname is resolving.

Using your favorite text editor, open the Postfix configuration file:

vim /etc/postfix/main.cf

Add the line:

smtp_bind_address = 192.168.0.1

Where 192.168.0.1 has to be replaced with the primary IP address of the server.

Then, restart Postfix:

/etc/init.d/postfix restart

Need help?

Do you need help setting up this on your own service?
Please contact us and we’ll provide you the best possible quote!