Passing SPF and DKIM doesn't mean DMARC passes. Alignment is a separate check — and missing it is why your authenticated emails still land in spam.
This cost me a week of debugging on the Prachyam mail setup. SPF passed. DKIM passed. Emails still landed in spam. The reason: DMARC alignment failure.
DMARC doesn't just check that SPF and DKIM pass — it checks that they pass for the right domain.
Specifically, DMARC compares the domain in the email's From: header against:
Return-Path (envelope sender)d= tagIf neither matches the From: domain, DMARC fails — even if SPF and DKIM themselves are technically valid.
You're sending via a third-party service (Mailchimp, SendGrid, or in our case a shared relay). The relay signs with its own DKIM key (d=sendgrid.net) and sets its own Return-Path. Both pass authentication. But your From: header is team@prachyam.org. Neither the DKIM domain nor the SPF domain matches prachyam.org. DMARC alignment fails.
DMARC has two alignment modes, set in the _dmarc TXT record:
v=DMARC1; p=quarantine; aspf=r; adkim=r;aspf=r (relaxed): SPF domain just needs to share the organizational domain. mail.prachyam.org aligns with prachyam.org.aspf=s (strict): exact match required. mail.prachyam.org does NOT align with prachyam.org.adkim=r/s.Relaxed mode is almost always what you want for your own infrastructure.
Either:
d=prachyam.orgOption 3 is the only one that gives you full alignment control without trusting a third party with your private key.
Karanveer Singh Shaktawat
Full Stack Engineer & Infrastructure Architect
Building portfolio, contributing to open source, and seeking remote full-time roles with significant technical ownership.
Pick what you want to hear about — I'll only email when it's worth it.
Did this resonate?
How Postfix queues work, why they pile up, and the exact commands to drain, inspect, and recover them when things go sideways.
The full story of building a self-hosted email stack across 12 domains and 6 servers at Prachyam Studios — the architecture, the hard lessons, and why I'd do it again.
# Send a test email to mail-tester.com and read the DMARC section
# Or check the Authentication-Results header in received emails:
# dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=prachyam.orgIf you see dmarc=fail alongside dkim=pass and spf=pass, alignment is your problem.