Handling mail using remove mailserver/ns

neek

Verified User
Joined
Nov 15, 2005
Messages
6
I have a few domains, that use remote dns as well as mail. So all that is being handled locally is the website. Now this is fine with the exception of processing web forms etc, mail gets delivered locally.

So I unchecked the option "Use this server to handle emails" in the MX records screen for that domain.

This is where it gets werid. This domain in has multiple mx records, the primary being 0 and the 3 more at 20 30 and 40. Now from looking at the exim logs, it is delivering mail on the first attempt to the last server at 40???? Now while email does arrive as the backup simply redelivers it, I can't for the life of me think why this is happening.

This isnt restricted to one domain, it does it on all that have this setup.


Cheers
Nick
 
exim will get all the IP#s for all the MX records, and try them in order, lowest cost to highest. It will use the first one that connects.

Jeff
 
Well I can say for sure that's not the way exim is handling it in this case. In all my tests it picks the hightest cost record.

Running a quick test on something like dnsreport.com shows them being processed in the correct order, and mail sent by other servers picks the correct one every time.

If nobody else has this problem I'm obviously missing something here in DA, as there is nothing wrong with the setup of the remote dns.

Regards
Nick
 
Have you tried the following:

$ dig example.com mx

Then for each mx in turn from lowest cost to highest cost:

$ telnet aa.bb.cc.dd 25

to see which connect?

That's what exim is doing.

Jeff
 
Very strange, there must be something it does not like about the first server in the list. I tried all the usual tests of manually connecting to port 25, which works fine.

It would deliver mail to it if I removed the other mx servers from the list, but as soon as I added them it would jump to that last one again. So then I took the first one out leaving the other 3 in place with the same cost. With the first one gone it started delivering normally again, ie delivering to the first one in the list not that last.

It's all a bit strange, but we are implementing a new setup for backup mx in the near future, so for the time being I have just removed all the backups forcing it to deliver to the first one.
 
Back
Top