
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
Related Content
Use Zoho as External SMTP Server with Postfix on Ubuntu 20.04
January 23, 2025
Article
How to Install Postfix, Dovecot, and Roundcube on Ubuntu 20.04
April 1, 2025
Article
Simple Mailserver With Postfix, Dovecot, And Sieve On FreeBSD 10
January 23, 2025
Article
How to Install GitLab Community Edition (CE) 11.x on Ubuntu 18.04 LTS
January 23, 2025
Article
No comments yet.