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

The problem is : i can only send mail with the main ip, when i change it to another one from the range ex : 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[]:25: Connection timed out).

Additionnal infos : - No DNS setup yet - The block 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 to - 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.


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.

  • Thanks for your reply, The 'ip route' command output is : dev eth0 proto kernel scope link src <= the main ip and dev eth0 proto kernel scope link src – optimine Mar 14 '13 at 12:22
  • Basically, the connection timed out issue means the traffic is not arriving, it could be a firewall or some other impediment to the traffic flow, but the first thing to check is that the proper routes exist. – NickW Mar 14 '13 at 12:22
  • I'm guessing the fact that you're coming from a source of 0 on the second range is also going to cause you problems.. 0 is not a valid IP address, just like 255. You can only use 1 to 254 in a /24 – NickW Mar 14 '13 at 12:32
  • I will change it now and check, this is my route command output i dont know if its correct : Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface * U 0 0 0 eth0 * U 0 0 0 eth0 link-local * U 1002 0 0 eth0 default UG 0 0 0 eth0 – optimine Mar 14 '13 at 12:37
  • Do you need to have both IP ranges on eth0? This is not the easiest thing in the world to set up correctly. Like I said though, the default gateway is the one from the original IP, so 64.X.X.0 will try and send through 199.X.X.65, which isn't easy, considering they are not on the same subnet, or range. – NickW Mar 14 '13 at 12:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.