Authenticating Email Using SPF, DKIM & DMARC
Overview
Despite advancements in real-time messaging solutions, email remains a key tool for business communication and collaboration. With security threats on the rise, organizations must embrace strong email authentication protocols — including SPF, DKIM, and DMARC — to secure networks and protect important information. This comprehensive guide explains what email authentication is, why it’s necessary, and how you can use SPF, DKIM, and DMARC to keep your business emails and networks safe.
What are SPF, DKIM & DMARC?
Businesses today still rely heavily on email for communication, collaboration, and outreach. According to one study, the average business user sends and receives 121 emails daily. This makes email a top target for threat actors, with 91% of all cyberattacks starting with a phishing email. To mitigate risk and enable secure email at scale, businesses must use secure email authentication protocols, including the Sender Policy Framework (SPF), Domain Keys Identified Mail (DKIM), and Domain-Based Message Authentication Reporting and Conformance (DMARC). These authentication mechanisms make it easier to detect email fraud and prevent harmful messages from reaching end users and impacting operations. Let’s explore each authentication method, how to set them up, and some additional best practices for managing email security.
What is SPF?
SPF is an email authentication protocol that enables organizations to specify which email servers can send emails on behalf of their domains. By configuring an SPF, organizations can prevent threat actors from sending emails that appear to come from the company itself and using those messages to spam or dupe end users.
How an SPF record works
Setting up an SPF requires organizations to attach an SPF record to the Domain Name System (DNS). This creates a secure email exchange by letting a recipient email server know that the incoming message originates from an authorized IP address within your organization. Security administrators often use SPF records to detect incoming phishing emails and prevent them from penetrating the organization.
Is it hard to create an SPF record?
Setting up an SPF record should be relatively straightforward for most IT teams. Some preliminary information gathering and a brief setup process is required. However, the most important part is entering the right information and ensuring the SPF is correctly configured.
Pros and cons of SPFs
With an SPF in place, your business can prevent threat actors from creating harmful messages and using your company’s property to infect other organizations. At the same time, SPF filtering can help ensure that all incoming emails originate from the right domain, helping organizations avoid costly cybersecurity breaches. Further, SPF policies can also increase an organization’s domain reputation score, making it more likely that emails end up in the recipient’s inbox. However, SPF doesn’t work with forwarded emails; if someone forwards an email from your domain, their IP address will not appear on your SPF record. As a result, that email could fail to pass authentication and wind up in a spam folder. In addition, SPF records can be time-consuming and challenging to maintain. Organizations need to update these records any time they change their IP address or onboard a new third-party vendor that will send emails from the company’s domain.
What is DKIM?
DKIM is another common email authentication technique that prevents harmful messages from passing through to users. This strategy enables users to ensure that an incoming message originates from an authorized domain.
How does DKIM secure an email exchange?
DKIM is an authentication strategy that uses cryptographic authentication to digitally sign an email message. In turn, email providers can verify that the message originates from the organization that appears to be sending it. Here’s how it works: An administrator uses a private key to encrypt the header in an outbound email. The receiving server then deploys a public key, which sits inside a DKIM record, to decode the message and verify its sender. To access a DKIM record, an email server must query the domain’s DNS records.
Is it difficult to implement a DKIM record?
To implement DKIM, organizations must go through a brief qualification process. For example, you need to verify whether your domain provider supports a 1024- or 2048-bit DKIM key. It’s also necessary to check outbound gateway settings and determine whether there’s an existing DKIM key for the domain in question.
Pros and cons of DKIM
DKIM creates a secure email exchange between two parties and prevents important messages from winding up as spam. DKIM also helps detect potentially malicious messages, reducing the chances an impersonator attacks anyone on the organization's email list. The main disadvantage to using DKIM is that it only requires signing a specific part of a message, which makes it vulnerable to replay attacks. As a result, someone can insert additional fields and forward the message, and the signature will still match.
What is DMARC?
SPF and DKIM have shortcomings that make them vulnerable to security and performance issues. DMARC combines SPF and DKIM, providing a more complete email authentication service to protect against spoofing, spam, and phishing. With DMARC, a business publishes a policy known as a DMARC record that defines email authentication practices. The record provides specific instructions to incoming mail servers to enforce its rules.
Passing vs. aligning in DMARC
When using DMARC, the domain for a passing DKIM or SPF must correlate with the domain of the message’s “from” header within the body of the email. In order to receive DMARC authentication, the emails need to align with each other. If there’s a mismatch, DMARC will fail to authenticate the message, and the email will fail or receive a spam flag.
Three DMARC policies to know about
There are three DMARC policy options to select from:
The “none” policy informs a recipient’s email provider to avoid taking action if an email fails a DMARC inspection.
The “quarantine” policy involves placing questionable messages into custom folders for further inspection.
The “reject” policy instructs the provider to automatically block an email that can’t pass a DMARC inspection.