Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

share|improve this question

1 Answer 1

up vote 0 down vote accepted

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.

share|improve this answer
    
Thanks for your reply, The 'ip route' command output is : 1.1.1.64/28 dev eth0 proto kernel scope link src 1.1.11.66 <= the main ip and 2.2.2.0/24 dev eth0 proto kernel scope link src 64.128.252.0 –  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 199.250.198.64 * 255.255.255.240 U 0 0 0 eth0 64.128.252.0 * 255.255.255.0 U 0 0 0 eth0 link-local * 255.255.0.0 U 1002 0 0 eth0 default 199.250.198.65 0.0.0.0 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

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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