Why would exchange get wrong MX record

Shane King 31 Reputation points
2021-11-13T23:29:35.717+00:00

I have been getting more sites that report a problem with mail getting to recipients. The scenario is this:

The user replies to, or sends an email to a domain on M365/Hosted Exchange. The email fails to be sent and an investigation in each case shows the following:

149123-sample-mx-redcated.png

When exchange is asking for the MX record, it receives the secondary MX record and not the primary. The end result is that the email is rejected when it is sent to the secondary MX server, which no longer hosts the email domain for the recipient.

I am seeing this in On-Prem Exchange 2010, 2013, 2016, 2019, and the combination of the recipients email is hosted on M365/Hosted Exchange + 2 or more MX records + the secondary MX is to their ISP.

I know the recipient IT techs should remove the stale MX records, but many don't understand the impact when we've discussed it. For those that do remove the redundant MX the issue is resolved.

My question/s:

  1. Is M365/Hosted Exchange behind this, is is saying "I'm too busy so go to the secondary"
  2. Is it a DNS latency issue.
  3. On the senders exchange servers, NSLookup sees the same - when I query the MX record it does not receive the primary.
  4. in 90% of cases i create a dedicated send connector which resolves the issue, but I dont want to have to created more and more send connectors if there is a fix.
Windows Server
Windows Server
A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.
12,171 questions
Windows DHCP
Windows DHCP
Windows: A family of Microsoft operating systems that run across personal computers, tablets, laptops, phones, internet of things devices, self-contained mixed reality headsets, large collaboration screens, and other devices.DHCP: Dynamic Host Configuration Protocol (DHCP). A communications protocol that lets network administrators manage centrally and automate the assignment of Internet Protocol (IP) addresses in an organization's network.
1,023 questions
Exchange Server Management
Exchange Server Management
Exchange Server: A family of Microsoft client/server messaging and collaboration software.Management: The act or process of organizing, handling, directing or controlling something.
7,357 questions
0 comments No comments
{count} votes

5 answers

Sort by: Most helpful
  1. Andy David - MVP 142.2K Reputation points MVP
    2021-11-14T12:33:54.977+00:00

    I usually blame Exchange for issues like this, but if nslookup is not seeing the mx record, then I would look at the on-premise DNS as the issue - assuming it doesnt match what you see for the recipient domain using an online testing tool like: https://mxtoolbox.com/

    1 person found this answer helpful.
    0 comments No comments

  2. Limitless Technology 39,371 Reputation points
    2021-11-16T08:32:00.937+00:00

    Hi there,

    The lowest preference is the MX with the highest priority, ie the one that a sending mail server should try first. The purpose of multiple MX records is to either: Provide some load balancing by using multiple MX records with the same preference set.

    To correct this error
    Use the nslookup.exe utility to verify that the Mail Exchanger (MX) record exists on the DNS server.
    If the MX resource record does not exist, manually add or modify the resource record.

    You can get reference from here https://learn.microsoft.com/en-us/connectivity-analyzer/no-mx-records-were-found-specified-smtp-domain

    -------------------------------------------------------------------------------------------------------------------------------------------------------------

    --If the reply is helpful, please Upvote and Accept it as an answer--

    1 person found this answer helpful.
    0 comments No comments

  3. Gary Reynolds 9,391 Reputation points
    2021-11-14T10:10:32.753+00:00

    Hi @Shane King

    I'm not sure if it makes any difference, but a preference of zero, doesn't feel right. I've checked the RFC and there is no explicit statement that you can't use zero, I've just never used it. Maybe try changing it to 1 and see if this make any difference.

    Gary.

    0 comments No comments

  4. Jamie Sabbatella 646 Reputation points
    2021-11-14T13:17:12.463+00:00

    Hi @Shane King

    This is really interesting.

    You're right, only valid MX records should exist for servers that can accept the domains email, so that is the root problem here. As they should all be able to receive and route mail!

    Preference of 0 zero is acceptable. Any 16 bit integer can be used, 0 - 65535 - (RFC1035)

    Those weights, are just preferences to try and use, many issues could be faced at time of send which then force a different MX than expected, but if they are published they should all be valid and accept and route the email.

    Investigating the failing NSlookup could be helpful. It would be worth looking at the logs on the send connector to see what is going on at time of send.

    Keep me posted!

    Kind regards,

    Jamie Sabbatella


  5. Shane King 31 Reputation points
    2021-11-14T23:41:43.563+00:00

    It seems to be IP V6 related and M365

    Using NSLookup, set type=MX

    • 3rd party domain A returns 2 IP V6 records (translating to .xxxx-xxxx.protection.outlook.com, and two additional records in IP V4 format, that point to mail servers that no longer host the domain.
    • Same for 3rd Party domain B

    I pondered what to do next, so I called the Registrant for one of the 3rd parties. The L2 tech thanked me. It seems they have been getting reports of this and not known what was happening. She ran thru the same queries as I did and Bingo got the same result. She pointed out that in their training they are told M365 MX record must have a priority of Zero and be the only MX record. She also confirmed that if anyone sends to the secondary or tertiary mail servers, they will get NDR's for obvious reasons - its hot hosted there any more.

    The issue comes back to the customers IT people don't know they need to remove the stale MX records, and she needed the customer in this case to request the removal of the stale MX's

    Because I am on my clients billable time, and its a 3rd party issue, I'm not going to dig any deeper. I'm meeting with a 3rd party affected by this who was surprisingly willing to listen "hey this guy I dont know called me and told me our email system isn't working properly and I need to change some settings...." sound familiar :)