Back to blog
Threat Intel
Phishing Forensics

Inherited Chaos: The Post-Merger SPF Remediation Playbook

Your company just acquired another; now their messy SPF records are your problem. It's time to audit, consolidate, and reclaim your security boundary.

MailSleuth Research
Email Security Team
July 19, 20267 min read
An illustration of tangled messes of yarn being woven into a neat braid, symbolizing the consolidation of complex SPF re

The acquisition was announced on Monday. By Tuesday, the champagne is gone and the dread sets in. You’ve just inherited two dozen domains, a shadow IT ecosystem you can’t see, and a rat's nest of DNS records that are now, somehow, your responsibility.

Among the most immediate and critical threats in this new landscape is the acquired company's Sender Policy Framework (SPF) records. These aren't just simple TXT records; they are a public declaration of trust. They are a map of every third-party service, every forgotten marketing tool, and every internal application ever authorized to send email on behalf of those domains. And most of the time, that map leads to a minefield.

This isn't a theoretical exercise. A poorly configured SPF record from an acquired domain is a gaping hole in your sending reputation and a backdoor for phishing. Your job is to close it. This playbook is your operational plan.

First 72 Hours: Map the Blast Radius

Your first task is reconnaissance. You need a complete inventory of every domain the acquired company owns. Don't just ask for a list; they won't know all of them. The primary corporate domain is obvious, but the real risk lies in the forgotten ones: marketing campaign domains, vanity URLs for old products, defensively registered typo domains, and old regional TLDs.

Beyond the Primary Domain: Finding the Unknowns

Start with the known domains and query their SPF records directly using `dig txt +short example.com`. But that's just the appetizer. You need to dig deeper. Get read-only access to their DNS provider if you can; zone files are the ground truth. Lacking that, use Certificate Transparency logs to find subdomains that have had TLS certificates issued. Cross-reference this with data from their web proxies, billing statements from Marketing, and any vendor lists you can get your hands on. Your goal is a comprehensive spreadsheet of every domain and its current SPF policy, if one exists.

For every domain you find, document its SPF record verbatim. Note which ones have no SPF record, which have a syntactically invalid one, and which ones have a weak `~all` (softfail) or, even worse, `+all` (pass all) mechanism. These are your initial triage priorities.

Chasing Phantoms in the `include` Chain

An SPF record is often a chain of delegations. The `include:` mechanism, defined in RFC 7208, is a pointer to another domain's SPF policy. In a mature organization, this chain can be long and convoluted, pointing to a dozen different third-party senders for HR, marketing, customer support, and finance.

v=spf1 include:_spf.google.com include:servers.mcsv.net include:mail.zendesk.com include:spf.old-crm.net ~all

Every `include:` is a homework assignment. It represents an explicit grant of trust. You must identify the business owner for every single service. Who uses Mailchimp (`servers.mcsv.net`)? Is that CRM (`spf.old-crm.net`) still active, or was it decommissioned three years ago? This is where a security team's work becomes forensic accounting. You'll need to collaborate with department heads, procurement, and IT to match each SPF entry to a current contract and a business need.

The operational stake here is immense. Each unnecessary `include` expands your trusted sender footprint, increasing the blast radius if that third party is ever compromised. If you can't find a business owner or an active contract for an included service, it must be slated for removal. No exceptions.

Unearthing Takeover Landmines in Stale Records

This is where negligence turns into an active vulnerability. A 'dangling' SPF record points to a domain (`include:`, `a:`, `mx:`) that has expired or is otherwise available for registration. An attacker can find these dangling pointers, register the domain, and instantly gain the ability to send SPF-authenticated email on your behalf. It is one of the most direct paths to a successful Business Email Compromise (BEC) attack.

The Mechanics of an SPF-Based Takeover

Imagine your acquired company's SPF record includes `spf.defunct-analytics.co`. They stopped paying for that analytics service, and the domain registration lapsed. An attacker runs a script, finds this, and registers `defunct-analytics.co` for $10. They then publish a new TXT record on that domain: `v=spf1 +all`. Now, any receiving mail server checking your company's SPF record will follow the `include:`, query `defunct-analytics.co`, see the `+all`, and return a `pass` verdict. The attacker can now send perfectly authenticated mail from their own servers, bypassing a fundamental layer of email security.

Your audit must include a `whois` lookup for every single domain referenced in the SPF records. Check registration status and expiration dates. Any domain that is unregistered, expired, or for sale is a critical vulnerability that must be removed from the SPF policy immediately. This is not a theoretical risk; threat actors are actively scanning for these.

The Consolidation: Flatten, Redirect, or Rebuild?

Once you've mapped the terrain and identified the risks, it's time to build a sane, unified policy. Your goal is to move from dozens of scattered, unmanaged records to a centralized, defensible state. You have a few strategic options, each with trade-offs.

Strategy 1: The Centralized Redirect

This is often the best approach. You create a single, canonical SPF policy hosted on a dedicated subdomain, like `_spf.yourcompany.com`. This record contains all the vetted `include` and `ip4`/`ip6` mechanisms for your entire organization. Then, you modify the SPF records on all your production domains (both yours and the acquired ones) to simply point to it.

v=spf1 redirect=_spf.yourcompany.com

The `redirect` modifier tells receiving servers that the 'real' SPF policy is located elsewhere. This is powerful. Now, when you need to add or remove a vendor, you change one record (`_spf.yourcompany.com`) and it applies everywhere instantly. This massively simplifies management and reduces the chance of error. It avoids the 10 DNS lookup limit imposed by RFC 7208 by keeping the individual domain records minimal.

Strategy 2: The Sunset Policy

Not every domain needs to send email. For all the defensively registered domains, old brands, and parked domains in your new portfolio, the correct SPF record is one that forbids all sending. This is a null SPF record, and it's an explicit signal to receivers that any email from this domain is fraudulent. This simple action shrinks your attack surface considerably.

v=spf1 -all

This policy returns an immediate `hardfail` for any sending IP. It's the strongest negative signal you can send. Combine it with a DMARC `p=reject` policy and you have effectively locked down that domain from being used in phishing.

Validate the Cutover with DMARC Intelligence

You cannot fly blind. Changing SPF records without a feedback mechanism is malpractice. DMARC (Domain-based Message Authentication, Reporting, and Conformance), defined in RFC 7489, provides this feedback loop through aggregate (RUA) reports. Before you make any changes, ensure all acquired domains have a DMARC record in place that points to a reporting address you control.

These XML reports, sent by mailbox providers, tell you which IPs are sending on behalf of your domain and how those messages are being judged for SPF and DKIM. After you consolidate your SPF policy, these reports are your verification tool. You are looking for new, unexpected failures from legitimate sources. Imagine a forwarded calendar invite from a vendor's mail exchanger breaks SPF; DMARC reports will show you that failure.

<record>
<row>
<source_ip>209.85.220.41</source_ip>
<count>15</count>
<policy_evaluated>
<disposition>none</disposition>
<dkim>pass</dkim>
<spf>fail</spf>
</policy_evaluated>
</row>
<identifiers>
<header_from>acquired-co.com</header_from>
</identifiers>
<auth_results>
<spf>
<domain>some-forwarder.net</domain>
<result>pass</result>
</spf>
</auth_results>
</record>

Notice the `auth_results` block. The SPF check passed, but for the wrong domain (`some-forwarder.net`), not the `header_from` domain (`acquired-co.com`). This fails DMARC's alignment requirement, which is why the top-level SPF evaluation is a `fail`. This is the kind of critical detail that DMARC reports expose, helping you find legitimate but unaligned sending sources that your new SPF policy might be breaking. Monitor these reports daily after the cutover.

The takeaway

An M&A event forces a confrontation with technical debt. The SPF audit is your first, best chance to impose a rational security model on an inherited digital footprint. It's not just DNS janitorial work; it's a critical boundary definition exercise that asserts who is, and who is not, allowed to speak for your brand.

The process is methodical: inventory, investigate, identify vulnerabilities, consolidate, and monitor. Parsing raw XML DMARC reports can be a pain, but whether you're using a parser script or a platform like MailSleuth.AI, the goal is the same: verify every legitimate source is passing SPF alignment before you tighten the screws with a `p=reject` policy. Don't just clean up the mess; build a fortress.

#email-security#spf#dmarc#mergers-and-acquisitions#domain-security#spf-audit
MailSleuth Research
Email Security Team

We dissect phishing campaigns and email infrastructure so you don't have to.