The Conductor#
Published in 2015 (RFC 7489).
So far, we have seen that:
- SPF validates the IP but verifies the
Return-Path, not theFrom. - DKIM validates the content and verifies the signature domain (
d=). It does not verify theFrom.
DMARC (Domain-based Message Authentication, Reporting, and Conformance) does not offer a new technical authentication method, but a policy layer that builds on SPF and DKIM to solve the alignment problem.
DMARC uses the results of SPF and DKIM and adds a simple rule: For the email to be valid, the domain visible to the user (the From) must be “aligned” (identical) with at least one of the two authenticated protocols (either the SPF domain or the DKIM domain).
The 3 pillars of DMARC#
- Alignment (Identifier Alignment): DMARC checks whether the
Fromdomain matches either the domain validated by SPF (that of theReturn-Path) or the DKIM signature domain (thed=tag of theDKIM-Signatureheader field). This match is called “alignment”. This is what prevents a spammer from using, for example, Mailjet’s infrastructure (SPF valid for Mailjet) to send an email withFrom: president@whitehouse.gov. DMARC fails becausewhitehouse.govis not aligned withmailjet.com. This mechanism is what finally prevents the spoofing of the visible address. - Policy: DMARC lets the domain owner tell the recipient what to do if validation fails. This is defined by the
p=tag in DNS:
p=none: Observation only. “Just tell me who is failing, but let the email through.” (Ideal for getting started and auditing.)p=quarantine: Suspicion. “Put the failing emails in the recipient’s Spam folder.”p=reject: Maximum protection. “Simply reject the failing emails. They will never arrive.”
- Reporting (RUA/RUF): This is the feedback loop. Receiving servers (Gmail, Yahoo, etc.) send daily XML reports to the address defined in the DMARC record. This allows the administrator to know exactly who is sending emails on their behalf (legitimately or not) and to fix their configuration before switching to
rejectmode.
graph TD
%% --- Styles ---
classDef input fill:#e3f2fd,stroke:#1565c0,stroke-width:2px,color:#000
classDef check fill:#fff9c4,stroke:#fbc02d,stroke-width:2px,color:#000
classDef pass fill:#c8e6c9,stroke:#2e7d32,stroke-width:2px,color:#000
classDef fail fill:#ffcdd2,stroke:#c62828,stroke-width:2px,color:#000
classDef policy fill:#e1bee7,stroke:#8e24aa,stroke-width:2px,color:#000
%% --- STEP 1: THE EVIDENCE ---
subgraph INPUTS ["1 - THE AVAILABLE EVIDENCE"]
HeaderFrom["๐ค Header FROM<br/>(What the user sees)"]:::input
SPF_Res["๐ SPF result<br/>(Return-Path domain)"]:::input
DKIM_Res["๐ก๏ธ DKIM result<br/>(Signature domain d=)"]:::input
end
%% --- STEP 2: THE ALIGNMENT TEST ---
subgraph ALIGNMENT ["2 - ALIGNMENT CHECK"]
%% Invisible links to force the structure
HeaderFrom --> CompareSPF
HeaderFrom --> CompareDKIM
CompareSPF{"Does the FROM match<br/>the SPF?"}:::check
CompareDKIM{"Does the FROM match<br/>the DKIM?"}:::check
SPF_Res --> CompareSPF
DKIM_Res --> CompareDKIM
end
%% --- STEP 3: THE DMARC VERDICT ---
subgraph VERDICT ["3 - OVERALL VERDICT"]
FinalDecision{"At least ONE<br/>match?"}:::check
CompareSPF --> FinalDecision
CompareDKIM --> FinalDecision
FinalDecision -- YES --> DMARC_OK["โ
DMARC PASS<br/>(Inbox)"]:::pass
FinalDecision -- NO --> DMARC_FAIL["โ DMARC FAIL<br/>(Not aligned)"]:::fail
end
%% --- STEP 4: POLICY ENFORCEMENT ---
subgraph ENFORCEMENT ["4 - POLICY"]
PolicyCheck["๐ฎ Reading p=..."]:::policy
DMARC_FAIL --> PolicyCheck
PolicyCheck -- "p=none" --> ActNone["Let it through<br/>(Monitoring)"]:::policy
PolicyCheck -- "p=quarantine" --> ActSpam["Spam folder"]:::policy
PolicyCheck -- "p=reject" --> ActReject["๐ซ Full rejection"]:::fail
endGoing further#
The two alignment modes: relaxed and strict#
The alignment described above can be more or less tolerant. DMARC defines two modes, configurable independently for SPF and for DKIM via the aspf and adkim tags of the DMARC record:
relaxed(default mode, valuer): alignment is validated as long as the two domains share the same organizational domain (the registrable “root” domain, for examplea.comfor bothbnc3.a.comandmail.a.com). A subdomain is therefore enough to align with its root domain.strict(values): alignment requires an exact match of the domains.bnc3.a.comis then not considered aligned witha.com.
In the absence of the aspf=/adkim= tags, the relaxed mode applies. This is the most common behavior, and it is what makes the custom Return-Path technique described below possible.
Aligning SPF: the custom Return-Path#
Recall that SPF is evaluated on the envelope domain (the Return-Path), not on the From. For DMARC, it is therefore not enough for SPF to be PASS: the domain thus validated must also be aligned with the From.
Now, by default, an ESP handles bounces under its own domain. Take Mailjet:
- The default
Return-Pathis of the formโฆ@bnc3.mailjet.com. - SPF is
PASSthere (the IP is indeed authorized bymailjet.com), but the validated organizational domain ismailjet.com, whereas theFromisโฆ@a.com. - SPF alignment fails:
mailjet.comโa.com.
The workaround is to configure a custom Return-Path: you publish a subdomain of your own domain (for example bnc3.a.com) as a CNAME to the ESP’s bounce infrastructure (bnc3.mailjet.com). The envelope then carries โฆ@bnc3.a.com, whose organizational domain is a.com: SPF alignment passes (in relaxed mode).
| Default Return-Path | Custom Return-Path | |
|---|---|---|
| Envelope domain | bnc3.mailjet.com | bnc3.a.com (CNAME โ bnc3.mailjet.com) |
| SPF result (RFC 7208) | PASS | PASS |
| Validated organizational domain | mailjet.com | a.com |
SPF alignment (relaxed) with From: โฆ@a.com | โ fails | โ passes |
Note: this custom Return-Path is not strictly required for DMARC to pass. ESPs also delegate the DKIM signature under your domain (via selector CNAMEs), which provides DKIM alignment. Since DMARC is satisfied with the alignment of just one of the two protocols, an aligned DKIM is enough. The custom Return-Path therefore mainly adds robustness (DMARC then rests on two aligned channels instead of one), and some also like it for having their own domain appear in the Return-Path.
Where to publish (or not) a provider’s SPF#
Everything above boils down to a simple rule, which often puzzles people:
- If the bounces of a mailing are handled under your domain โ a subdomain actually present in your DNS zone, with its own
TXTrecord (this is the case with Amazon SES in “custom MAIL FROM domain”) โ then it is there, on that subdomain, that you must publish the provider’s SPFinclude. - If the bounces are handled under the provider’s domain โ its own domain, or a subdomain on your side as a mere
CNAMEto its infrastructure (the case of Mailjet withbnc3.a.comโbnc3.mailjet.com) โ then the SPF actually consulted is the provider’s. Publishing itsincludeon the apex of your domain (a.com) is useless for authentication: that record is never queried for those mailings.
This last point is counterintuitive: the interface of some ESPs (Mailjet, for example) nonetheless demands this include on your root domain and shows a warning in its absence, even though it is purely cosmetic. Mailjet support explicitly confirmed this to us (exchange of Friday 10 July 2026): this include serves only to display a green check in the interface, and its absence does not affect deliverability as long as the return-path is correctly configured. It therefore has no effect on deliverability, but it consumes one of your 10 DNS queries allowed by SPF. Keep it if you are far from that limit (to avoid an administrator being alarmed by a false alert), remove it if you are running out of room.
A note on forwarding and Mailing Lists (SRS & ARC)#
You may have noticed that some email forwarding works despite SPF’s limitations. This is thanks to two mechanisms handled by intermediate servers (over which you have no control):
- SRS (Sender Rewriting Scheme): The relay server rewrites the envelope (Return-Path) so that SPF passes with its own IP. This fixes SPF but breaks DMARC alignment.
- ARC (Authenticated Received Chain): The relay server signs the authentication state (SPF/DKIM) before modifying the message. This allows the final recipient (such as Gmail) to validate the email through a chain of trust, even if SPF and DKIM technically fail on arrival.
A few useful URLs#
- https://easydmarc.com/tools/dmarc-lookup : Checks the DMARC syntax and provides information about the DMARC of the checked domain.
