Email Authentication Protocols

SPF, DKIM, and DMARC are DNS-based email authentication protocols that work together to prevent spoofing, phishing, and spam. SPF verifies allowed sending IP addresses, DKIM provides a cryptographic signature ensuring email integrity, and DMARC leverages both to instruct servers on handling failed messages.

Key Email Authentication Pillars

  • SPF (Sender Policy Framework): A DNS record listing authorized mail servers (IP addresses) allowed to send emails on behalf of your domain.
  • DKIM (DomainKeys Identified Mail): Adds a digital signature to emails, confirming they were not altered in transit and truly originated from your domain.
  • DMARC (Domain-based Message Authentication, Reporting, and Conformance): Sets policies for receiving servers, telling them to None (monitor), Quarantine (spam folder), or Reject (block) messages that fail SPF or DKIM checks

How They Work Together

  1. Authorization: You publish an SPF record and DKIM keys in your DNS.
  2. Verification: Receiving servers check if the IP is listed (SPF) and if the signature is valid (DKIM).
  3. Policy Enforcement: DMARC checks if the domain in the “From” address aligns with SPF and DKIM findings.
  4. Result: Unauthorized emails are blocked or filtered, enhancing security and improving deliverability.

Implementation Order

  1. Setup SPF: Define permitted IPs.
  2. Setup DKIM: Configure cryptographic keys.
  3. Setup DMARC: Set policies to p=none initially to monitor traffic without blocking legitimate emails