Email Authentication - SPF, DKIM, and DMARC
About 2 min read
Email authentication is a mechanism that combines three protocols, SPF, DKIM, and DMARC, to verify that the sending domain of an email is legitimate. The email protocol (SMTP) has made sender spoofing easy ever since its original design in 1982, making it a breeding ground for phishing and business email compromise. Since February 2024, Google and Yahoo have required bulk senders to configure SPF/DKIM/DMARC.
The Roles of the Three Protocols
It lists in a DNS TXT record the IP addresses allowed to send email from this domain. The receiving server verifies whether the sending IP is included in the SPF record and, if not, returns fail (not authorized) or another result depending on how the record is written. It is a mechanism that verifies the envelope sender (Return-Path).
The sending server attaches a digital signature to the email header and body. The receiving server verifies the signature using a public key published in DNS, confirming that the email has not been tampered with and that the signing domain has claimed some responsibility for it. It plays a role similar to the wax seal on a letter.
Based on the verification results of SPF and DKIM, it defines a policy for how to handle emails that fail authentication. There are three levels: none (monitoring only), quarantine, and reject. It also has the ability to send reports of authentication results to domain administrators.
Overview of the Authentication Flow
The 2024 Mandate by Google / Yahoo
Starting in February 2024, Google and Yahoo made the following mandatory for bulk senders. In Google's case, the requirements apply to domains that send more than 5,000 messages a day to Gmail accounts.
- Setting up either SPF or DKIM (all senders)
- Setting up both SPF and DKIM and setting a DMARC policy (bulk senders)
- Including a one-click unsubscribe link (marketing emails)
- Keeping the spam complaint rate below 0.3%
As a result of this mandate, emails from domains that have not configured email authentication may be either sorted into the spam folder in Gmail and Yahoo Mail or rejected outright. From the perspective of phishing countermeasures as well, configuring email authentication helps protect an organization from being impersonated.
BIMI - The Rise of Brand Logo Display
BIMI (Brand Indicators for Message Identification) is a mechanism that allows domains that have already set a DMARC enforcement policy (quarantine or reject) to display their brand logo in the inbox. Gmail, Apple Mail, and Yahoo Mail support it. The displayed logo is one cue that helps recipients spot impersonation such as spear phishing.
Common Misconfigurations and Pitfalls
- The DNS lookups for the SPF record exceed 10. When many external services are used, the chain of include directives reaches the limit and SPF stops functioning
- The DKIM key length remains at 1024 bits. 2048 bits or more is recommended, and some receiving servers judge a 1024-bit signature as weak
- Leaving the DMARC policy at p=none. p=none is a value that requests no specific action from receivers regarding delivery of messages, and RFC 7489 uses it in its example of a monitoring-only phase
- SPF breaks during email forwarding. Because the forwarding server's IP is not included in the original SPF record, configuring ARC (Authenticated Received Chain) may become necessary
The articles on protecting email accounts and AI-generated phishing also cover related topics in email security.
Was this article helpful?
Related Terms
- DMARC - Domain-Based Email AuthenticationDMARC is a domain-based email authentication protocol that combines SPF and DKIM results, letting domain owners control how spoofed messages are handled by receiving mail servers.
- BEC - Business Email CompromiseBusiness email compromise impersonates executives or partners via email to trick targets into wire transfers or sharing confidential data. FBI reports put cumulative losses above $50 billion, with AI deepfakes raising the threat.
- Digital Certificates - Proving Identity OnlineA digital certificate binds a public key to an identity, verified by a certificate authority. TLS certificates secure websites, while code-signing certificates verify software authenticity.
- Data Masking - Anonymizing Sensitive InformationData masking is a technique that replaces sensitive data with realistic fake values so it can be used safely in testing and analytics. Learn how it differs from encryption, plus static and dynamic masking methods.