Send all outgoing email trough one IP address in postfix
Tuesday, October 25, 2011 posted by Till
When a server has more then one IP address, then postfix will use all IP addresses randomly to send out emails. This can cause your emails to be listed as SPAM on other servers because the sending IP does not match the reverse IP of the server hostname. The solution is to bind postfix to the primary IP address of the server.
Edit the postfix main.cf file:
vi /etc/postfix/main.cf
and add the line:
smtp_bind_address = 192.168.0.1
were 192.168.0.1 has to be replaced with the primary IP address of the server. Then restart postfix:
/etc/init.d/postfix restart

Leider ist die Lösung hier überhaupt nicht hilfreich. Wenn man unter ISPConfig 3 den Postfix wie angegeben konfiguriert werden die Mails von AMAVIS nicht mehr angenommen und es geht gar nichts mehr raus.
Sinnvoller ist die folgende Anpassung in der /etc/postfix/master.cf:
smtp unix – – – – – smtp
-o smtp_bind_address=217.14.118.60
127.0.0.1:25 unix – – – – – smtp
und mit dieser Lösung funktioniert dann alles, inklusive die Zusammenarbeit mit AMAVIS?
I need to do this (staring to get blocked by hotmail, aol, yahoo, etc – no reverse found, even though I have set it), and did it yesterday. Then I had no working mail. No mail was being processed or delivered. I also tried modifying the /etc/postfix/master.cf, which contained smptd_bind_address=127.0.0.1 to our principal server IP, and that did not help either. Connections were “lost” immediately after connection the logs show. Additionally amavis could not connect.
In the master.cf file there is a line: 127.0.0.1:10025 for smptd, and there are lines referring to amavis with 127.0.0.1 see in both files, I believe. I don’t know if all references to 127.0.0.1 need to be changed to our main IP in both files, or not?
Can you give any further advice on this, please? I have the “perfect server deb squeeze, courier postfix, fail2ban … set up the way your tutorial describes it with ISPConfig3.
Thanks for any further advice.