( status=deferred :25: Connection timed out ) issue with Postfix

centos6domain-name-systemnetworkingpostfix

I have postfix installed on a Centos server with 1 main ip 1.1.1.1 and a range of ips 2.2.2.0/24

The problem is : i can only send mail with the main ip 1.1.1.1, when i change it to another one from the range ex : 2.2.2.222 the mail stays in the queue ( status=deffered )

maillog error: to=, relay=none, delay=70314, delays=70164/0.01/150/0, dsn=4.4.1, status=deferred (connect to mx2.hotmail.com[65.55.92.136]:25: Connection timed out).

Additionnal infos : – No DNS setup yet – The block 2.2.2.0/24 is added by creating a new file in /etc/sysconfig/network-scripts called ifcfg-eth0-range0 and we've put all the ip adresses in it starting from 2.2.2.0 to 2.2.2.255 – I use to change the sending ip using "inet_interface = ip" on the /etc/postfix/main.cf

Could you please help me to fix the problem.

Best Answer

You need to add the proper routes on the server, otherwise it will probably try and send through the default router of your first IP range.