Authentication-Results: mx.google.com;
dkim=pass header.i=@sendgrid.info;
spf=pass smtp.mailfrom=bounces+123@em1234.sendgrid.net;
dmarc=fail (p=QUARANTINE) header.from=example.com
Both SPF and DKIM passed, and DMARC still failed. That's because DMARC doesn't only ask whether they passed, but for which domain. At least one of them has to pass for the domain in the From address. That match is called alignment.
How alignment works
- SPF aligns when the envelope sender (Return-Path, shown as
smtp.mailfrom) has the same domain as the From address. - DKIM aligns when the signing domain (
d=, shown asheader.dorheader.i) has the same domain as the From address. - In relaxed mode (the default), subdomains count:
bounce.example.comaligns withexample.com. In strict mode (aspf=s,adkim=s) they must match exactly.
In the example, SPF passed for sendgrid.net and DKIM passed for sendgrid.info. Neither is example.com, so DMARC fails.
This is the typical result of connecting an email platform without completing its "domain authentication" step.
How to fix it
- Set up DKIM with your own domain in the sending service. Look for "domain authentication", "sender authentication" or "custom DKIM". You publish a few CNAME records, and the service signs with
d=example.com. This is the fix that matters most, because DKIM also survives forwarding. - Optionally, set a custom return-path (for example
bounce.example.com) so SPF aligns too. - Use relaxed alignment unless you have a specific reason for strict. Strict mode breaks every service that uses a subdomain of yours.