P H O T O N

CONSOLE

Loading

Cryptographic Alignment

Envelope From vs. Header From
DMARC SPF & DKIM Alignment Mechanics Explained

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.

7 min read • RFC 7489 Alignment • Strict vs Relaxed
Direct Answer: Envelope From vs Header From in DMARC

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).

1. Technical Comparison: Envelope From vs. Header From

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.

2. How DMARC Evaluates Alignment (The Dual Check)

DMARC requires at least one authentication protocol (SPF or DKIM) to both pass authentication and achieve alignment with the Header From:

# Case 1: SPF Alignment Header From: billing@acme.com Envelope From: bounces@acme.com (or mail.acme.com in relaxed mode) Result: SPF Aligned (Pass) # Case 2: DKIM Alignment Header From: billing@acme.com DKIM Signature: v=1; ... d=acme.com; ... Result: DKIM Aligned (Pass)

3. Relaxed vs. Strict Alignment (aspf / adkim)

In your DMARC record, you specify alignment behavior via the aspf and adkim tags:

  • Relaxed (Default): aspf=r; adkim=r allows subdomains. For example, notifications.acme.com aligns with acme.com.
  • Strict: aspf=s; adkim=s mandates an exact domain match. Subdomains fail alignment under strict mode.

4. Why Senders Fail DMARC Even with Valid SPF

When using generic third-party SMTP relays, the relay server often uses its own domain for the envelope:

MAIL FROM: --> SPF passes for generic-relay.com From: --> Header From does NOT match generic-relay.com! DMARC Evaluation: --> SPF Fails Alignment!

5. Configuring Custom Return-Path with Photon Console

Photon Console solves alignment by provisioning a custom CNAME alias for your domain:

# DNS CNAME Configuration for 100% SPF Alignment Host / Subdomain: pm-bounces.acme.com Record Type: CNAME Target / Value: relay-bounces.photonconsole.com

6. Frequently Asked Questions

Why does SPF pass but DMARC fails for alignment?

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.

What is the difference between relaxed and strict DMARC alignment?

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.

How does Photon Console achieve 100% DMARC alignment?

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.

Guarantee 100% DMARC Alignment with Photon Console

Deploy custom CNAME return-paths and automated 2048-bit DKIM signing to pass Google and Yahoo DMARC alignment on every outbound email.