A WordPress site sends a password reset via Mailgun. SPF passes (Mailgun’s IPs are in the include). DKIM passes (Mailgun signed the message). DMARC fails. The user gets nothing. The audit checks each record individually and finds them all valid. The cause is alignment — DMARC requires not just that SPF and DKIM pass, but that the domain they pass against matches the From-header domain. WordPress, plus its plugins, plus a misconfigured SMTP integration, breaks alignment more often than any other class of mail system.
What’s happening
DMARC has two alignment checks:
- SPF alignment. The domain in the SMTP
MAIL FROM(the envelope sender) must match the From-header domain. SES, Mailgun, and other senders by default use their own envelope domain (bounces+abc@mg.mailgun.org). The From header saysnoreply@example.com. They do not align. SPF passes against the envelope domain, DMARC fails alignment. - DKIM alignment. The
d=tag in the DKIM signature must match the From-header domain. If the SMTP provider signs withd=mg.example.comand the From saysnoreply@example.com, that’s a subdomain mismatch — strict alignment fails, relaxed alignment passes.
DMARC says: at least one of SPF or DKIM must align and pass. If neither does, DMARC fails. Receivers honoring p=reject discard the message; p=quarantine lands it in spam; p=none lets it through but reports it.
WordPress-specific breakage patterns:
- Subdomain From with parent-domain DMARC. WP sends from
wp@news.example.comto satisfy a marketing-stream split, but DMARC is published only onexample.com. Receivers may still apply it (DMARC is inherited unless explicitly broken), and alignment depends on the SPF/DKIM record location. - Custom From filter rewrites to a non-authenticated domain. A WooCommerce extension rewrites the From to a vendor’s address. DKIM signs against
example.com. Receivers see From=vendor.com, DKIM=example.com— no alignment. - Forwarding-induced failure. A mailing list or alias rewrites the envelope sender (breaking SPF alignment). DKIM still aligns if the body wasn’t modified. ARC sealing is the upstream solution.
How to verify
Pull the original headers of a failed message. In Gmail, “Show original” displays them. Look for:
Authentication-Results: mx.google.com;
dkim=pass header.i=@example.com header.s=mg
spf=pass (google.com: domain of bounces+abc@mg.mailgun.org designates ...
dmarc=fail (p=REJECT sp=REJECT dis=REJECT) header.from=example.com
DMARC says dmarc=fail here. The header.from is example.com. SPF passes but against mg.mailgun.org — not aligned. DKIM passes for @example.com — aligned. The DMARC fail in this case means strict alignment is required and neither method satisfied it.
Set up DMARC reporting:
dig +short TXT _dmarc.example.com
The record should contain rua=mailto:dmarc@example.com. Aggregate reports arrive within 24 hours from receivers actually applying DMARC, and they tell you exactly which sources are unaligned.
The fix
- Use relaxed alignment unless you have a reason for strict. DMARC defaults to relaxed alignment:
aspf=r adkim=r. This allows subdomain matches (DKIM signed formg.example.com, From saysexample.com— aligned). Strict requires exact domain match. - Configure the SMTP provider to use your domain for the envelope sender. Mailgun, SES, and Postmark all support custom Return-Path / bounce domains. Setting
bounces.example.comfor Mailgun means SPF passes againstexample.com(relaxed alignment) and DMARC SPF alignment is satisfied. - Configure the provider to sign with your domain in
d=. All three providers do this by default once you publish their DKIM records under your domain. If the headers showd=as the provider’s domain, the provider’s domain authentication isn’t completed. - Audit
wp_mailfilters that rewrite From. Any rewrite that points From to a domain you don’t authenticate is a DMARC failure waiting to happen. - Publish DMARC at the right level. A parent-domain DMARC applies to subdomains by inheritance. If you want subdomain-specific policy, publish
_dmarc.news.example.comseparately. Thesp=tag controls subdomain policy explicitly. - Move to
p=quarantineand thenp=rejectonly after theruareports show 99%+ alignment. Rushing top=rejectwithout observation is how legitimate WordPress notifications start vanishing. For enterprise WordPress hosting clients, we run the rollout against theruareport timeline, not the calendar.
For the foundation, our SPF/DKIM/DMARC reference covers the DNS shape. Alignment is the layer on top.
Stack Harbor ingests DMARC aggregate reports for enterprise WordPress hosting clients and turns them into a list of unaligned sources to fix, not a wall of XML. If your DMARC is at p=reject and you suspect WordPress is one of the unaligned sources, we can decode the reports.