Mail Server Using Wrong IP

CheGuevara

Verified User
Joined
Nov 23, 2009
Messages
26
Hello,

Perhaps someone can assist me with this issue, that seems to have started recently. It seems like mail is being sent from a different IP address instead of one that should be used. I noticed because one eMail got rejected by destination mail server, due to SPF record not matching up. Let's say main ip is 1.1.1.2 and i am sending from [email protected]. That is the main ip of the server and ip for the domain example.com. Instead this eMail gets sent from IP 1.1.1.10 which is also used on the server, but related to a different domain. Any idea how I could fix this issue ?
 
I'm having the same issue on a new box...... Exim is using (sending) a totally different IPv6 address to that of the server rDNS's
Received: from server4.laws-hosting.co.uk (mars04.laws-hosting.co.uk. [2001:41d0:1:92d0::4])
I had this with IPv4 years ago but forgot the reason.
 
Hello,

Please check your
Code:
ifconfig
output.

If other is not specified in exim.conf it uses the very first IP in a list of ifconfig.

Hi,

Thanks for your answer. The one I want it to use IS the one first in ifconfig list. But the one it seems to be using is the LAST one in the list. Strange right? Should i force in exim.conf ? Does that mean other domains on the server will have problems with IP not matching to rDNS though?
 
Strange right?


Not, yet. Do the all IP belong to ne and the same subnet? Don't you already have re-defined interface option in /etc/exim.conf?
What is your default router:

Code:
netstat -rn
?

does it match your main IP? What IP do you see if you wget/lynx this link http://icanhazip.com/ ?

Should i force in exim.conf ?[/code]

Probably yes, but I'd hesitate.

Does that mean other domains on the server will have problems with IP not matching to rDNS though?


Not too sure what you mean here.
 
I see no interface option currently in exim.conf

Destination Gateway Genmask Flags MSS Window irtt Iface
1.1.1.2 0.0.0.0 255.255.255.255 UH 0 0 0 eth0

is the first line in output of that command, which is the right ip.

When doing wget I see the wrong IP, one that mail server sends from. I guess that's the issue. Now how do I go about changing that?
 
Try to restart network on your server:

debian/ubuntu

Code:
/etc/init.d/networking restart

rhel/centos


Code:
/etc/init.d/network restart

and then check the ip once more.
 
hah, that actually did the trick... Simple and weird at the same time. Thanks a lot for your help!
 
Back
Top