Original Email System Analogy
The original email system is like an unsecured postcard where anyone could write any name in the “From” section, and the post office would deliver it without question. Modern protocols are like adding security features to that postcard after the fact:
- <3Cstrong>SPF is like the post office checking a list of approved couriers.
- DKIM is a tamper-evident wax seal on the message.
- DMARC is the final inspector ensuring the name on the seal matches the name written on the front.
- ARC is like a certified chain of custody log stamped onto the postcard by every intermediate post office that handles it. If the postcard is forwarded and the original seal (DKIM) must be broken to reroute it, the ARC stamps prove to the final recipient that the postcard was authentic when it first entered the system and has been handled by trusted intermediaries ever since.
SPF (Sender Policy Framework)
What SPF Solves (Fundamental context)
SPF prevents unauthorized sending infrastructure from sending mail on behalf of your domain.
It answers: “Is this sending IP allowed to send email for this domain?”
Design Flow
- Receiving MTA extracts MAIL FROM / Return-Path
- Queries DNS for SPF TXT record
- Compares sender IP against authorized IP mechanisms
- Returns result: Pass | Fail | SoftFail | Neutral | None
Key Architectural Point: SPF validates infrastructure identity. It does not validate the visible From header.
SPF Limitations (By Design)
- Breaks on forwarding
- DNS lookup limit (10)
- Does not protect display name spoofing
- Does not validate message integrity
Real Use Case
Think of SPF as a guest list at a building entrance. If your name (IP) isn’t on the list, security flags you.
Real-world: Prevents attackers from sending email “from your domain” using random servers.
DKIM (DomainKeys Identified Mail)
What DKIM Solves
DKIM ensures message integrity and domain accountability using cryptography.
It answers: “Was this message modified after it left the sender’s domain?”
Design Flow
- Sending MTA hashes selected headers + body
- Hash is signed with private key
- Signature added to DKIM-Signature header
- Receiver retrieves public key from DNS using selector
- Recalculates hash and verifies signature
Critical Architectural Insight: DKIM binds message content to sending domain. Survives forwarding (if content not modified).
DKIM Limitations
- Body/header modification breaks DKIM
- Does not enforce policy by itself
- Alignment not mandatory without DMARC
Use Case
DKIM is like tamper-proof sealing wax on a letter. If broken, the receiver knows someone altered it.
Real-world: Ensures invoices, approvals, and legal emails are not modified in transit.
DMARC (Domain-based Message Authentication, Reporting & Conformance)
Why DMARC Was Necessary
SPF and DKIM existed but:
- Not enforced
- Not aligned with visible sender
- No feedback loop
DMARC introduces policy, alignment, and reporting.
DMARC Architectural Design Flow
- Receiver evaluates SPF & DKIM
- Checks alignment with From domain
- Applies domain policy:
none,quarantine, orreject - Sends aggregate (RUA) and forensic (RUF) reports
Alignment (Critical for Architects)3>
- SPF alignment: MAIL FROM domain = From domain
- DKIM alignment: d= domain = From domain
DMARC Limitations
- Forwarding breaks SPF alignment
- Mailing lists modify content → DKIM fails
- No trust propagation across hops
Use Case
DMARC is your written security policy: “If email fails checks, block it.”
Real-world: Stops brand spoofing and CEO fraud emails.
ARC (Authenticated Received Chain)
Why ARC Was Introduced
DMARC fails in legitimate multi-hop scenarios: Mailing lists, Forwarders, Secure email gateways.
ARC solves: “How can downstream receivers trust authentication that already happened upstream?”
ARC Deep Architectural Design
ARC vs DMARC – Architectural Reality
Implementing SPF, DKIM, and DMARC
Prerequisites (Non-Negotiable)
- You own and control the domain (DNS access required)
- You have identified all outbound mail sources (M365, Proofpoint, CRM, etc.)
- DNS provider supports TXT records and 2048-bit DKIM keys
- You understand DNS lookups and SMTP flow
SPF Implementation Steps
Step 1: Inventory All Sending Sources
Create a list of every system that sends mail as your domain (e.g., M365, Proofpoint, App servers).
Step 2: Create the SPF Record (Syntax)
v=spf1
Example: v=spf1 include:spf.protection.outlook.com include:_spf.pphosted.com ip4:203.0.113.10 -all
Step 3: Understand Each Mechanism
include:– Import another domain’s SPFip4: / ip6:– Explicitly allowed IP-all– Hard fail for everything else
Step 4: Qualifier Logic
Start with ~all (SoftFail) then move to -all (HardFail) after validation.
Step 5: DNS Lookup Limit
Maximum 10 DNS lookups allowed (include, a, mx, exists, etc.).
DKIM Implementation Steps
Step 1: Enable DKIM in Sending Platform
(e.g., Enable in M365, Generate key in Proofpoint).
Step 2: Create DKIM DNS Record
Format: <selector>._domainkey.example.com
Value: v=DKIM1; k=rsa; p=... (Public Key)
Step 4: DKIM Signing Process
- Sending MTA hashes headers + body
- Hash is signed with private key
- DKIM-Signature header added
DMARC Implementation Steps3>
Step 1: Understand Alignment
SPF and DKIM must align with the visible From domain.
Step 2: Create Initial DMARC Record (Monitor Only)
v=DMARC1; p=none; rua=mailto:dmarc@yourdomain.com; ruf=mailto:dmarc@yourdomain.com; fo=1; adkim=r; aspf=r;
Analyze DMARC Reports: Duration 2-4 weeks. Then move to enforcement (`p=quarantine`, then `p=reject`).
Reference Articles & RFCs
Core RFCs (Primary Standards – MUST READ)
- 1. SPF — RFC 7208: https://datatracker.ietf.org/doc/html/rfc7208
- 2. DKIM — RFC 6376: https://datatracker.ietf.org/doc/html/rfc6376
- 3. DMARC — RFC 7489: https://datatracker.ietf.org/doc/html/rfc7489
- 4. ARC — RFC 8617: https://datatracker.ietf.org/doc/html/rfc8617
Government / Research-Grade Whitepapers
- NIST Technical Note: Email Authentication Mechanisms
- Academic Research: https://arxiv.org/abs/2011.08420
Enterprise Deployment
- Cisco Email Authentication Deployment Guide: PDF Link
- Microsoft Defender for Office 365: Authentication Architecture