[ SPF ]

Multiple SPF records: merge permissions without retaining obsolete senders

Replace competing SPF records with one reviewed policy, preserving legitimate senders while removing stale or overbroad permissions.

By the EmailAuth research team

[ Key points ]

  • Multiple selected records are not merged by receivers.
  • Preserve only justified permissions and intentional ordering.
  • Verify DNS and representative paths without inventing results.
On this page

Two SPF policies at the same DNS name do not combine into a larger authorised sender list. When SPF record selection returns more than one applicable record, evaluation ends with permerror under RFC 7208 §4.5. The repair is one coherent policy, not a third TXT entry.

The difficult part is deciding which permissions still belong. Copying every mechanism into a single line may remove the syntax failure while preserving obsolete vendors, excessive networks and a lookup-limit problem.

Confirm what is actually duplicated

Query TXT records at the exact domain used for the SPF check. Other TXT records, such as domain-verification tokens, are not automatically SPF records and should not be deleted as part of this repair. Distinguish multiple resource records from multiple quoted character-strings within one TXT record. Under RFC 7208 §3.3, strings inside one record are concatenated; separate SPF records are not.

Save the full DNS answer, TTL and authoritative server information. Confirm the relevant zone and owner name before changing anything. A provider may automatically append the zone name to a host field, making an apparently correct editor entry land at the wrong name.

Reconstruct the intended sender set

Create one row per mechanism with four fields: the business service, accountable owner, supporting provider configuration, and evidence of current sending. For explicit IP ranges, identify who operates the addresses and why that range is needed. For includes, inspect the vendor's current instructions and recursive policy dependencies. Treat an unknown mechanism as a question to resolve, not a permission to retain forever.

Separate senders using this envelope domain from services using their own envelope domain. A vendor's visible From address is not enough to prove that its traffic needs an SPF include here. Likewise, absence from a short observation period does not establish retirement: invoices or seasonal campaigns may run infrequently.

Build one ordered policy

Preserve the chosen authorisations and one intentional final policy. Do not concatenate entire records, leaving a second v=spf1 token or an all mechanism in the middle. Under RFC 7208 §5.1, an early all matches every remaining source, so later mechanisms are unreachable.

Illustrative starting state: one record is v=spf1 ip4:192.0.2.10 -all; another is v=spf1 ip4:198.51.100.20 ~all. If both documentation-only addresses represent confirmed, current senders, a possible merged policy is v=spf1 ip4:192.0.2.10 ip4:198.51.100.20 ~all. Choosing the final qualifier requires its own routing review. If the second sender was retired, merging it would preserve unnecessary authority.

Evaluate the full policy, including nested includes and redirects. Under RFC 7208 §4.6.4, RFC 7208 imposes a limit of ten lookup-causing terms during evaluation; counting only visible include statements is insufficient. Explicit ip4 and ip6 mechanisms do not themselves consume that term budget, but replacing managed includes with copied IP lists creates a maintenance obligation.

Deploy without a prolonged ambiguous state

Prefer an atomic DNS record-set update when the provider supports it: replace the competing policies with the approved single record in one change. If the interface requires separate edits, plan the sequence and acknowledge the transient risk of missing or duplicate policy. Do not create a “temporary” extra SPF record and leave it for propagation.

Verify authoritative answers, then relevant recursive responses. Cached old answers retain their prior freshness intervals; RFC 8767 §4 also permits qualifying stale-answer use after expiration. TTL is not a guaranteed global revocation deadline. Send representative messages from every retained service and confirm the evaluated identity and result at a trusted receiver. Test an unmatched source under your control as well, so an accidental universal pass is not mistaken for success.

Keep the cleanup evidence

The change record should explain each retained and removed mechanism, the lookup evaluation, the before-and-after DNS state and the test results. A duplicate-record alert is closed only when there is one selected SPF record and the policy expresses the reviewed sender set. This turns a one-off DNS repair into a maintainable authorisation inventory.

Record the decision and its limits

For the two-address example, a permission worksheet should retain each owner decision and expected match separately from the final qualifier. The merged ~all example still returns softfail for an unmatched address; it is not a recommendation to weaken a previous -all policy. Changing that qualifier needs an explicit decision. No DNS update or delivery test has been performed for this illustration.

[ Takeaway ]

Multiple selected records are not merged by receivers. Preserve only justified permissions and intentional ordering. Verify DNS and representative paths without inventing results.

[ By role ]

What this means for you

Choose your role for practical next steps.

IT / Mail Admin

Merge semantics, not strings.

Record order, qualifiers and recursive dependencies must survive the consolidation correctly.

Next steps

  1. Save the original record set.
  2. Test every retained service and an unmatched source.

CISO / SecOps

Review the retained trust.

Every preserved include or network is an authorisation decision.

Next steps

  1. Require ownership for each mechanism.
  2. Record why removed senders no longer need access.

Founder / Non-technical

Use the incident to clean ownership.

The repair should identify which business services still have permission, not merely silence a checker.

Next steps

  1. Approve service retirements with owners.
  2. Include infrequent sending jobs in validation.

[ FAQs ]

Frequently asked questions

Can I publish a separate SPF record for each vendor?

Not at the same owner name. Multiple selected SPF records produce permerror rather than merged permissions.

RFC 7208 §4.5

Should I delete every other TXT record?

No. Unrelated verification records can remain. Identify SPF records using the protocol’s selection rules.

RFC 7208 §4.5

Are two quoted strings two SPF records?

Not when they are character-strings inside one TXT resource record. Their contents are concatenated without inserted spaces.

RFC 7208 §3.3

Can I paste both complete policies together?

No. Keep one version marker, review mechanism order and choose one effective final policy.

RFC 7208 §4.6 RFC 7208 §5.1

Why not retain every old include?

It preserves vendor authorisation and consumes evaluation resources even when the service is no longer needed.

Does ten visible includes guarantee compliance?

No. Nested evaluation and other lookup-causing terms also count toward the limit.

RFC 7208 §4.6.4

When is the repair verified?

After DNS serves one applicable policy and representative messages from retained senders evaluate as expected.

What if the DNS editor cannot update atomically?

Plan and document the transient state, minimise the interval between edits and verify the resulting record set immediately.

[ Sources ]

Sources

  1. RFC 7208

    Sections §2.4 · §3.3 · §4.5 · §4.6 · §4.6.4 · §5.1 · §4.1

  2. RFC 8767

    Sections §4

[ Glossary ]

Glossary

SPF
Evaluation of a connecting IP against the policy for the relevant SMTP identity.

RFC 7208 §2.4

DNS TTL
Ordinary freshness interval, not a guaranteed global deletion or revocation deadline; qualifying serve-stale use may continue after expiration.

RFC 8767 §4

Enterprise provenance

Why top financial institutions and governments retired their email security dashboards.

Traditional email authentication platforms sell you a dashboard and ask your engineers to do the labour. In high-stakes environments, manual oversight means delayed enforcement, configuration drift and unmonitored shadow domains.

EmailAuth is the agentic email provenance platform. Our agents enforce p=reject, keep third-party senders aligned and move your domains to full RFC 9989 compliance, the new DMARC standard,, with human-in-the-loop auditability.

Governments Large enterprises Tier-1 financial institutions

SaaS · Dedicated tenancy · Air-gapped on-prem · BYOK encryption

Knowledge Base