# DMARC Organizational Domain Discovery, Public Suffix List (PSL) Fallback, and sp= Tag

> How RFC 7489 §3.2 uses the Mozilla Public Suffix List (e.g. .co.uk, .com.au, .github.io) to find organizational _dmarc policies and apply sp= subdomain rules.

- **Canonical URL**: https://opslint.dev/dmarc/organizational-domain-public-suffix-fallback-sp-tag/
- **Category**: `DMARC`
- **Interactive Workbench**: [Open in Live Workbench](https://opslint.dev/dmarc/#domain=paypal.com)
- **Normative Specifications**: `RFC 7489 §3.2 (Organizational Domain Determination via Public Suffix List)`, `RFC 7489 §6.3 & §6.6.3 (Policy Discovery: Exact _dmarc vs Organizational Fallback & sp=)`

## Incident Symptom & Root Cause

**Production Symptom**: Mail sent from a deep corporate subdomain like alerts.eu.billing.example.co.uk unexpectedly gets rejected (or allowed!) even though _dmarc.alerts.eu.billing.example.co.uk does NOT exist in DNS—or multi-tenant SaaS subdomains under a custom domain accidentally share alignment across unrelated customer tenants!

**Protocol / Engine Root Cause**: Per RFC 7489 §6.6.3, when _dmarc.<full-domain> returns no DMARC record, the receiver DOES NOT walk up one label at a time! Instead, it uses the Public Suffix List (PSL) to jump straight in ONE single fallback query to the Organizational Domain (_dmarc.example.co.uk), and applies its sp= (Subdomain Policy) tag—or inherits p= if sp= is omitted!

## Remediation Diff (Broken vs Verified Fix)

### Misunderstanding Intermediate Subdomain Inheritance (Skipped by RFC 7489!)

```text
; Engineer publishes policy at intermediate level _dmarc.eu.example.co.uk
; expecting mail from @alerts.eu.example.co.uk to inherit it:
_dmarc.eu.example.co.uk. 3600 IN TXT "v=DMARC1; p=none; rua=mailto:eu-ops@example.co.uk"
_dmarc.example.co.uk.    3600 IN TXT "v=DMARC1; p=reject; sp=reject; rua=mailto:sec@example.co.uk"

; SURPRISE: For @alerts.eu.example.co.uk, RFC 7489 queries:
;   Query 1: _dmarc.alerts.eu.example.co.uk -> NXDOMAIN
;   Query 2: _dmarc.example.co.uk (jumps straight to PSL root, SKIPPING _dmarc.eu.example.co.uk!)
; Result: @alerts.eu.example.co.uk gets REJECTED by sp=reject!
```

### Explicit Leaf _dmarc Override + Clean PSL Root Policy

```text
; 1. Organizational root policy covers apex (p=) and all unoverridden subdomains (sp=):
_dmarc.example.co.uk.           3600 IN TXT "v=DMARC1; p=reject; sp=reject; rua=mailto:sec@example.co.uk"

; 2. Any subdomain needing its own pilot policy MUST publish _dmarc on that EXACT sending domain!
_dmarc.alerts.eu.example.co.uk. 3600 IN TXT "v=DMARC1; p=quarantine; rua=mailto:eu-ops@example.co.uk"
```

## Engineering Deep Dive

RFC 7489's two-step DNS lookup rule (never a full tree walk!) was designed deliberately to cap DNS lookup latency and prevent tree-walking DoS attacks on deep hostnames. Step 1 queries _dmarc.<From-domain> (for example _dmarc.a.b.c.example.co.uk). If no valid v=DMARC1 record is found, Step 2 computes the Organizational Domain by finding the longest matching suffix in the Public Suffix List (co.uk) plus one label to the left (example.co.uk), and queries _dmarc.example.co.uk! Intermediate labels (c.example.co.uk and b.c.example.co.uk) are NEVER queried in standard RFC 7489!

Why does the Mozilla Public Suffix List (PSL) matter so much for .co.uk, .com.au, .co.jp, .gov.uk, and cloud platforms like .appspot.com or .s3.amazonaws.com? Without the PSL, a naive string splitter taking the 'last two dot-separated labels' would conclude that co.uk is the organizational domain shared by every company in Britain—allowing attacker.co.uk to pass relaxed DMARC alignment for barclays.co.uk! Conversely, multi-tenant platforms hosting untrusted user subdomains MUST register on the PSL (or isolate user tenants onto a separate domain) if they do not want tenant1.myplatform.com aligning under relaxed DMARC with tenant2.myplatform.com!

Notice how p= and sp= interact when Step 2 falls back to the organizational domain _dmarc.example.co.uk: if sp= is explicitly set (for example p=none; sp=reject; or p=reject; sp=quarantine;), all subdomains without their own _dmarc record obey sp=; if sp= is omitted, subdomains inherit p= automatically!

## RFC 7489 §6.6.3 Two-Query Policy Discovery Matrix

| Case / Engine | Protocol Behavior | Production Remediation |
| :--- | :--- | :--- |
| **From: user@example.co.uk** (`#psl-apex-match`) | Query 1 (_dmarc.example.co.uk) IS already the PSL organizational domain; applies p= tag. | sp= tag has zero effect on the organizational apex itself; only governs subdomains. |
| **From: bot@a.b.c.example.co.uk (no leaf _dmarc)** (`#psl-deep-subdomain-fallback`) | Query 1 misses; Query 2 jumps directly to _dmarc.example.co.uk (skips b.c & c!); applies sp= (or p=). | Place custom subdomain overrides directly at _dmarc.<exact-sending-subdomain>. |
| **Multi-label public suffixes (.co.uk, .com.br, .ac.jp)** (`#psl-multipart-tld`) | PSL identifies 2- or 3-label TLD suffix + 1 registrable label as Organizational Domain. | OpsLint uses the full IANA/Mozilla PSL database ('psl') for exact organizational domain resolution. |
| **Spoofed From: fake@nonexistent-sub.example.com** (`#psl-nonexistent-subdomain-nxdomain`) | Even though nonexistent-sub is NXDOMAIN, Query 2 STILL hits _dmarc.example.com and enforces sp=! | Set sp=reject on _dmarc.example.com to block random-subdomain phishing immediately! |

## Frequently Asked Engineering Questions

### Wait: what if our apex domain is still in monitoring mode (p=none), can we already lock down unused subdomains with sp=reject?

YES! Publishing 'v=DMARC1; p=none; sp=reject; rua=mailto:...' is one of the highest-leverage quick wins in enterprise email security: while you finish auditing legacy senders on @example.com under p=none, sp=reject immediately blocks attackers from spoofing @hr.example.com, @payroll.example.com, or @it-support.example.com! (Just publish explicit _dmarc.news.example.com p=none first on any real sending subdomains still being onboarded.)

### What is the IETF DMARCbis DNS Tree Walk draft vs RFC 7489?

While a future DMARCbis revision has explored bounded multi-label tree walks, production receivers deployed globally today follow RFC 7489 PSL Organizational Domain discovery—so NEVER rely on intermediate subdomain _dmarc inheritance for current production mail.

### Does publishing a leaf _dmarc.marketing.example.com override sp=reject on _dmarc.example.com?

Yes! Because Query 1 checks _dmarc.marketing.example.com FIRST and finds a valid v=DMARC1 record, discovery stops at Step 1 and never falls back to _dmarc.example.com's sp= tag.

## Related Problem-Cluster Guides

- [Stop Subdomain Phishing Attacks (@hr.example.com / @login.example.com) with DMARC sp=reject](https://opslint.dev/dmarc/subdomain-spoofing-protection-sp-reject-policy/) — Close the #1 enterprise DMARC blind spot where attackers bypass p=none on the apex domain by spoofing arbitrary nonexistent subdomains like @security.example.com.
- [DMARC Identifier Alignment Explained: SPF Pass + DKIM Pass Can Still Fail DMARC!](https://opslint.dev/dmarc/identifier-alignment-spf-dkim-relaxed-vs-strict/) — Why emails with spf=pass and dkim=pass still bounce with dmarc=fail when Return-Path or DKIM d= domains don't align with From:, plus aspf=r/s and adkim=r/s rules.
- [Fix Missing DMARC Aggregate Reports: External rua Destination _report._dmarc Authorization](https://opslint.dev/dmarc/external-destination-rua-report-dmarc-authorization/) — Why Gmail, Yahoo, and Microsoft silently drop DMARC rua/ruf XML reports sent to another domain, and how to publish RFC 7489 §7.1 _report._dmarc TXT records.
- [DMARC Rollout Playbook: p=none -> quarantine -> reject and How pct= Actually Works](https://opslint.dev/dmarc/gradual-rollout-p-none-quarantine-reject-pct-tag/) — Execute a zero-outage DMARC enforcement rollout from p=none to p=reject, and avoid the dangerous myth that pct=10 on p=reject drops unthrottled messages to None.
