CONSOLE
Loading
Demystify RFC 5321 vs RFC 5322 header layers. Learn why SPF can pass while DMARC still fails, and how to guarantee 100% alignment across Google and Outlook.
The Envelope From (RFC 5321 MAIL FROM: / Return-Path) is the hidden technical address used by mail transfer agents for delivery routing and non-delivery bounce reports. The Header From (RFC 5322 From:) is the visible address displayed to human recipients in email clients. DMARC alignment mandates that the domain in the Header From matches (or sub-aligns with) the domain authenticated by SPF (Envelope From) or DKIM (d= signature tag).
| Header Layer | RFC Standard | Visible to End User | Primary Functional Role |
|---|---|---|---|
| Envelope From | RFC 5321 (MAIL FROM:) |
No (Only in raw headers as Return-Path:) |
Specifies where receiving MTAs send bounce reports (NDRs) and where SPF checks DNS records. |
| Header From | RFC 5322 (From:) |
Yes (Displayed in Gmail/Outlook UI) | Identifies the human sender/brand identity to the recipient. |
DMARC requires at least one authentication protocol (SPF or DKIM) to both pass authentication and achieve alignment with the Header From:
In your DMARC record, you specify alignment behavior via the aspf and adkim tags:
aspf=r; adkim=r allows subdomains. For example, notifications.acme.com aligns with acme.com.aspf=s; adkim=s mandates an exact domain match. Subdomains fail alignment under strict mode.When using generic third-party SMTP relays, the relay server often uses its own domain for the envelope:
Photon Console solves alignment by provisioning a custom CNAME alias for your domain:
SPF validates the domain in the Envelope From (Return-Path). If your relay uses bounces@sharedrelay.com for the Return-Path, SPF passes for sharedrelay.com. However, if your visible Header From is user@yourdomain.com, the domains do not align, causing DMARC to fail unless DKIM alignment passes.
Relaxed alignment (default: aspf=r, adkim=r) allows subdomains to align with root domains (e.g., mail.yourdomain.com aligns with yourdomain.com). Strict alignment (aspf=s, adkim=s) requires an exact, character-for-character domain match.
Photon Console provisions custom Return-Path CNAME records (e.g., pm-bounces.yourdomain.com) and cryptographic 2048-bit DKIM keys scoped directly to your root domain, ensuring both SPF and DKIM achieve 100% DMARC alignment on every send.
Deploy custom CNAME return-paths and automated 2048-bit DKIM signing to pass Google and Yahoo DMARC alignment on every outbound email.
Trademark Notice & Nominative Fair Use: All third-party trademarks, logos, and service marks (SendGrid®, Mailgun®, Amazon SES®, Postmark®, Resend®, Brevo®, SMTP2Go®, SparkPost®) are property of their respective owners and used under 15 U.S.C. § 1115(b)(4).
Photon Console is independent and not affiliated with or endorsed by these providers. Pricing and plan details compiled from public sources as of November 2026. Read full legal disclaimer →