Ground Truth field notes · defensive security

Home›Email Security›Delivery & mail flow

Field case · DNS & domain control

You migrated the DNS. Did you migrate the registrar?

An entire acquired domain stopped receiving email, and nothing in Microsoft 365 or the mail gateway was broken. The DNS had been migrated after the acquisition, but the registrar never was, so someone outside the company could still point the domain wherever they liked. And they did.

An envelope tied to a signpost. The signpost has been turned away from a full address book towards an empty one.
  • Symptom: a user stopped getting payment-portal verification codes on one client's shared mailbox.
  • Real scope: no external mail was reaching any address on the acquired domain.
  • Cause: the domain's nameservers were switched at the registrar to an empty default DNS zone with no MX record.
  • Lesson: after an acquisition, migrating DNS is not enough. Take control of the registrar too.

01The ticket

It arrived as a mailbox-linking request. One comment turned it into a domain-wide outage.

A finance user handles accounts for several of the firm's clients. Each client has a shared mailbox on the acquired company's old domain (call it acquiredco.com), and those mailboxes live in the parent firm's Microsoft 365 tenant.

One payment portal sends its login verification codes to [email protected]. For every other client this "just worked". For one client, the codes had stopped arriving. The ask: please link the old address to the new one.

A day later the user added a comment: "I guess this happens in all the clients." That one line was the most important clue in the ticket.

02Ruling out the usual suspects

If the gateway never saw the mail, the problem is in front of the gateway.

My first theory was forwarding. The old domain looked like a separate system forwarding into the tenant, and forwarded mail from a sender with a strict DMARC policy often fails authentication and gets quarantined. That would fit "codes go missing".

The evidence didn't support it:

Search by every address

A mailbox answers to its primary address and every alias. Search the gateway by each of them, or by sender, before you conclude mail never arrived. Bulk senders often encode the original recipient in the Return-Path (bounces+…-user=domain@…), which tells you which alias was used.

A broader gateway search on the whole acquired domain gave the real clue. Plenty of mail had been flowing to @acquiredco.com addresses, and then it stopped completely, late on day 1. The gateway sits in front of everything, so the problem was before it.

03The twist: the domain had no MX record

Ask the domain's own nameserver, not just your resolver.

If mail isn't reaching the gateway, the next question is whether the world knows where to send it. A quick comparison against a healthy sister domain:

Resolve-DnsName parentco.com -Type MX
# 10 mxa-xxxx.pphosted.com, 10 mxb-xxxx.pphosted.com

Resolve-DnsName acquiredco.com -Type MX
# only an SOA in the Authority section: the zone exists, but holds no MX

To rule out caching, I asked the domain's authoritative nameserver directly, then 1.1.1.1 and 8.8.8.8. All three agreed.

Healthy domain: nameservers on AWS Route 53, MX to the mail gateway, SPF and DKIM present, company DMARC policy. Broken domain: GoDaddy default nameservers, no MX, no SPF, DKIM missing, registrar-default DMARC.
Same organisation, two domains. The broken one had two default web A records and nothing else of the company's.

The DMARC row was the tell. It reported to the DNS provider's own address, which nobody at the firm would have set up. It was a freshly created default zone.

04RDAP: when it changed, and where

DNS tells you what the zone says now. The registry tells you what changed, and when.

RDAP is the modern, JSON-speaking replacement for WHOIS. It's public and scriptable:

(Invoke-RestMethod https://rdap.org/domain/acquiredco.com).events |
  Select-Object eventAction, eventDate

The answer:

The zone's SOA serial carried the same date. On day 0, someone with access to the registrar account had switched the domain's nameservers to GoDaddy's defaults, and GoDaddy had created an empty zone to serve.

Why mail kept flowing for about a day: resolvers had cached the old answers, and the .com registry's nameserver records carry a long TTL. Senders kept using the old, correct DNS until their caches expired. The change was on day 0; users noticed on day 2.

05Root cause: the DNS moved, the registrar didn't

Whoever holds the registrar decides where the domain points.

I handed the evidence to the client's IT team, and they filled in the last piece within the hour. After the acquisition they had migrated the domain's DNS into their own AWS Route 53. But the registrar account had never been transferred. It still belonged to the acquired company's former IT administrator.

Before migration, the registrar points to the old DNS host. After the DNS migration, the same registrar account, not transferred and still controlled by the old owner, points to AWS Route 53.
The gap. The records moved to Route 53. Control of the signpost stayed with the old owner.

On day 0 he moved the domain back to GoDaddy DNS without copying any of the records. Changing nameservers doesn't move records; it only tells the world to look somewhere else. The somewhere else was empty.

Nothing in Microsoft 365 was misconfigured. The gateway wasn't dropping anything. The mail simply had nowhere to go.

This is a takeover path, not just an outage

Here the new zone had no MX, so mail bounced. With one more record, it could have been delivered to a server of the outsider's choosing: verification codes and password resets included. Treat registrar control as a security control.

06How an email actually finds its way

Three things people lump together as "DNS".

Step 1, the lookup. The sender's mail server asks a resolver where to deliver mail for acquiredco.com. The resolver asks, in turn:

  1. the root servers, which refer it to the .com registry;
  2. the .com registry, which says "this domain's nameservers are these";
  3. those nameservers (the DNS host), which answer the MX question: deliver to the gateway.

Step 2, delivery. The sender connects to the gateway, which filters the message and hands it to Exchange Online, which delivers it to the mailbox.

Step 1: sender mail server, DNS resolver, root servers, .com registry, DNS host (Route 53), result MX equals mail gateway. A dashed registrar box only changes the registry's answer. Step 2: sender mail server, mail gateway, Exchange Online, mailbox.
The registrar is never asked during delivery. In practice the resolver asks each server in turn and is referred to the next.

The registrar never appears in either step. It's the company that writes the nameserver entry into the registry. It only matters when someone changes that entry, and then it matters completely.

Mental model

The registrar is the signpost. The DNS host is the address book. The records are the pages. The firm had a complete address book in Route 53. Someone who still held the signpost turned it towards a blank book. The good book was still there; nobody was being sent to it.

Before: the registrar signpost points to the Route 53 book with MX, SPF and DKIM, and mail reaches the mailbox. After day 0: the signpost points to a new default zone with no MX, mail bounces back, and the Route 53 book sits unused.

07The fix, and checking it

One change, then verify the same way you diagnosed.

Because the original Route 53 zone still existed, the fix was one change: point the nameservers back to it. Every record came back at once, with nothing to rebuild. The client's IT team arranged this with the former administrator and started a registrar transfer to their own account so it can't happen again.

I didn't close the ticket on the user's word alone:

Resolve-DnsName acquiredco.com -Type NS  -Server 8.8.8.8   # awsdns-* (Route 53)
Resolve-DnsName acquiredco.com -Type MX  -Server 8.8.8.8   # gateway pair is back
Resolve-DnsName acquiredco.com -Type TXT -Server 8.8.8.8 |
  Where-Object Strings -like 'v=spf1*'                    # SPF is back

The user confirmed codes were arriving again. Codes sent while the domain had no MX were gone for good: senders' servers gave up and bounced them. Anything time-sensitive from that window had to be requested again.

08An M&A domain checklist

What to do for every domain that comes with an acquisition.

09The script

The checks above, packaged for the next time mail to a domain goes quiet.

Get-DnsMailEvidence.ps1 is read-only and needs no modules or admin rights. It queries MX, SPF, DMARC, DKIM, autodiscover, A, NS and SOA against each domain's authoritative nameserver plus 8.8.8.8 and 1.1.1.1, side by side with healthy control domains. It then pulls registry RDAP data (last changed, delegated nameservers, registrar) and writes a text report, a CSV and the raw RDAP JSON, ready to attach to a handover.

.\Get-DnsMailEvidence.ps1
# prompts for domains (problem domain first) and an optional ticket number

.\Get-DnsMailEvidence.ps1 -Domains problem.com,working.com -Ticket INC0000000
⇩  Download Get-DnsMailEvidence.ps1

The one-line model

Whoever holds the registrar decides where the domain points, and therefore where its mail goes. Migrate the registrar, not just the DNS.

Sources & further reading

Anonymised from real support work. Client, domain, people and ticket details have been changed; the investigation, the evidence and the fix are real.

Filed under
Email Security › Delivery & mail flow
Browse this part of the knowledge base.
Related

Comments

Questions or corrections welcome. Sign in with GitHub to join the thread.