Link to home
Start Free TrialLog in
Avatar of omfgwtflolbbq
omfgwtflolbbq

asked on

Misconfigured Secondary MX Record

Hi Experts
Recently silly old me added a Secondary MX record as a backup in case the primary goes down.  I figure that since the primary has the higher priority that the secondary would not come into play unless the primary was unreachable.  My small screwup came about when I misconfigured the address of the secondary MX record.   Now it seems we are bouncing about 50% or more of our emails.  I think this is the cause because it is the only thing I can think of that I have changed.

I am seeking clarification here.  I was under the assumption that only the primary MX record would be used unless it were offline.  I have read that the secondary is used regardless in a type of round robin fashion along with the primary.

Thanks
Avatar of Chris Dent
Chris Dent
Flag of United Kingdom of Great Britain and Northern Ireland image


Offline or Busy. If your Primary is a bit too busy to listen to an inbound SMTP request the secondary would be used.

When you say higher priority... you do mean a lower numeric value for the Primary, right? e.g.

domain.com.  MX  10  PrimaryServer
domain.com.  MX  50  SecondaryServer

Chris
Avatar of omfgwtflolbbq
omfgwtflolbbq

ASKER

Hi Chris
My primary is definitely not too busy.  Network utilisation in under 1%.
Yes my primary is set with a lower numeric value for higher priority in my case it is:

mail.mydomain.com MX 50 PrimaryServer
mail0.otherdomain.com MX 75 SecondaryServer
mail0.hostingcompany.com MX 150 TertiaryServer

So back to my original query.  What is the nature of MX Records? Is it:

1) All mail is directed to primary unless primary is unreachable.
or
2) Other MX servers are used in a round robin fashion with slight preference given to the primary.

Thanks

Chances are what is happening is a host who does not have your MX records cached is putting out a query for your MX record, receiving it, then putting out a DNS A record query to get the IP addresses for your MX servers, then receiving the secondary's IP first, and going with it. (Or having the first IP time out for some reason).

The priorities are normally (And I say normally) taken into account, given that all other systems are normal. That means, no trouble looking up all the IP's, no expired records (your SOA on your secondary MX record IP may have had a longer retry for example), etc. etc.

Then there is system administrators out there who like to do things against the RFC's, such as ignore SOA timings in DNS and force their own.

So, what it comes down to is, if you have two MX's listed, you'll get mail across both of them, even if the primary is up.
Hi Adraenyse
What you are saying seems to make sense.  That coupled with the fact that the secondary is has a listing in an RBL probably doesn't help either.  I called the secondary about the issue and they suggested that I set the primary with Priority 0.  They seemed to think that with a priority of 0 all email will go to the primary and will avoid the round robin situation.  Adraenyse can you verify this?
Last comment before points awarded.
ASKER CERTIFIED SOLUTION
Avatar of Chris Dent
Chris Dent
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial

> the host may prefer the secondary since it already holds the record.

It shouldn't, that would breach the RFC that defines the process for the use of MX records.

I don't object to your summary, I agree with it. I disagree with the reasoning given for it to fail over to the secondary server, but that's by-the-by really.

Chris
Finally the discussion I was after.  Thankyou for citing references and examples.  My experience is that RFC's aren't being followed and mail is delivered across all MX records.