Blog · Dmarc
Why SPF and DKIM Pass But DMARC Alignment Still Fails
When SPF and DKIM both pass but DMARC fails, most people assume something is misconfigured. Usually the setup is correct. The actual problem is a separate requirement that SPF and DKIM do not enforce: alignment. This distinction trips up a lot of people who are otherwise careful with their email infrastructure. Here is what is actually going on, and how to fix it.
The difference between authentication and alignment
SPF and DKIM are authentication mechanisms. They answer the question: was this email sent by or on behalf of an authorized entity? SPF checks which server is allowed to send email for a domain. When SPF passes, it means the sending mail server's IP is listed in the domain's SPF record. It says nothing about the From address the recipient sees. DKIM checks whether an email was signed with a private key that matches a public key published in DNS. When DKIM passes, it means the signature is cryptographically valid. It says nothing about whether the From address matches the signing domain. DMARC does something SPF and DKIM do not: it checks alignment. Alignment means the domain in the visible From address must match the domain that passed SPF or the domain in the DKIM signature. Without alignment, DMARC fails even when both SPF and DKIM pass. This is by design. DMARC RFC 7489 defines alignment as the requirement that the domain used in the RFC 5322 From header matches the authenticated domain. The purpose is to prevent someone from sending email that appears to come from your domain but is actually authorized by a completely different domain.What DMARC alignment actually means
DMARC has two alignment modes: relaxed and strict. Relaxed alignment allows subdomains. If your From address is newsletter@example.com and the authenticated domain is mail.example.com, relaxed alignment passes because the base domain matches. Strict alignment requires an exact match. newsletter@example.com must align with example.com and nothing else. In practice, most organizations use relaxed alignment because it accommodates legitimate email workflows where a subdomain is used for internal routing. Strict alignment is more secure but harder to implement without thorough audit of every sending system.Real example: reading authentication results
Here is a realistic authentication result you might see:Authentication-Results: mx.example.com;
spf=pass (google.com: 209.85.220.41 is authorized);
dkim=pass (google.com);
dmarc=fail (alignment mismatch)
SPF passes. DKIM passes. But DMARC fails. Why?
The From address is sender@example.com. The SPF result says the email was authorized by google.com. The DKIM signature is from google.com. Neither of those domains matches example.com. The From address claims to be from example.com but google.com is the authenticated sender. Without explicit authorization for google.com to send on behalf of example.com in the SPF record, DMARC alignment fails.
This happens constantly with transactional email platforms, marketing tools, and internal mail systems that relay through external services.
The five most common causes of alignment failure
1. Marketing email platforms Services like Mailchimp, SendGrid, Constant Contact, and Klaviyo send email from their own domains. If you want the From address to show your domain, these services must send through your domain's mail infrastructure, not theirs. Many setups configure the From address to display your brand name while the actual envelope sender is the platform's domain. That is where alignment breaks. 2. CRM and sales engagement tools Salesforce, HubSpot, Outreach, and similar tools often inject email through their own sending infrastructure. The email appears to come from your domain but is actually sent from the vendor's mail servers under their own SPF and DKIM. This is one of the most common causes of DMARC alignment failures in mid-size organizations. 3. Email forwarding When an email is forwarded, the original SPF check may pass for the original recipient's server, but the forwarded message often ends up with a different envelope sender. The forwarding server rewrites the From or adds its own envelope sender, breaking alignment. 4. Multi-step notification systems Password reset emails, order confirmations, and alert systems often route through third-party platforms. If the notification is generated by one system, sent through a relay, and then delivered by another, each step may introduce its own authentication domain. 5. Misconfigured third-party connectors in Google Workspace or Microsoft 365 Both platforms allow you to route email through third-party gateways for security scanning. If the gateway uses its own domain for SPF or DKIM rather than your domain, alignment fails even if the platform is correctly configured.How to diagnose alignment failures with DMARC reports
DMARC aggregate reports sent to your rua address contain the information you need. The key fields to look at are:- Source IP: which server actually sent the email
- SPF domain: which domain authorized the sending server
- DKIM domain: which domain signed the email
- DMARC result: pass, fail, or something else