Email authentication is crucial to ensure the deliverability of your messages and stop your emails from ending up in the spam folder.
If you’ve ever wondered how SPF, DKIM, and DMARC work and how you should use them, it’s your lucky day! Keep reading for our full guide to setting DNS records for email authentication.
What is email authentication?

Email authentication is typically achieved using cryptographic techniques, such as digital signatures and encryption, to verify the identity of the sender and to protect the message content from tampering. This process involves the use of several technologies, including DKIM, SPF, and DMARC, which work together to provide a comprehensive email authentication system.
When an email message is authenticated, it gives the recipient a high level of confidence that the message is legitimate and not spam or phishing. It also helps prevent spoofing, where an attacker impersonates a trusted sender, by ensuring the message originated from the claimed domain or IP address.
Why is email authentication important?
Email authentication is crucial for several reasons:
- Prevents Spoofing and Phishing: By verifying the sender’s identity, email authentication helps prevent attackers from impersonating legitimate organizations to steal sensitive information from recipients.
- Enhances Deliverability: Authenticated emails are more likely to reach recipients’ inboxes rather than being marked as spam. This improves communication effectiveness for businesses and organizations.
- Protects Brand Reputation: When emails are properly authenticated, it helps maintain the integrity of the sender’s brand, reducing the risk of damage caused by fraudulent emails that mislead recipients.
- Facilitates Reporting and Monitoring: Tools like DMARC allow organizations to receive reports on email authentication status, providing insights into how their emails are being handled and whether any malicious activity is occurring.
- Builds Trust: Recipients are more likely to trust emails that pass authentication checks, fostering a safer online environment for communication and transactions.
- Reduces Spam and Abuse: By establishing a verification process, email authentication can help reduce the amount of spam and abusive emails that flood inboxes, improving the overall email experience.
Types of email authentication
DKIM, SPF, and DMARC each contribute to effective email authentication, with the three technologies working together to ensure email is both safe and fully deliverable. Below, we look at SPF, DKIM, and DMARC in more detail:
What is DKIM?
DKIM (DomainKeys Identified Mail) is an email authentication technology that uses cryptographic signatures to verify the authenticity of email messages. When an email message is sent, DKIM adds a digital signature to the message header, which the recipient’s email server can verify to ensure that the message has not been tampered with in transit and that it originated from the claimed sender domain.
What is SPF?
SPF (Sender Policy Framework) is an email authentication technology that allows the owner of a domain to specify which IP addresses are authorized to send email on behalf of that domain. When an email message is received, the recipient’s email server checks the SPF record for the sender domain to ensure that the message is coming from an authorized IP address. If the SPF check fails, the message may be marked as spam or rejected.
What is DMARC?
DMARC (Domain-based Message Authentication, Reporting, and Conformance) is an email authentication technology that provides policy and reporting mechanisms for DKIM and SPF. DMARC allows the domain owner to specify how email messages that fail DKIM and SPF checks should be handled, and it provides feedback on the results of those checks. DMARC helps to prevent email spoofing and phishing by ensuring that email messages are only accepted if they meet the authentication policies specified by the domain owner.
How do DKIM, SPF, and DMARC differ?
DKIM, SPF, and DMARC are all email authentication methods, but they serve different purposes and work in distinct ways:
1. SPF (Sender Policy Framework)
- Purpose: Verifies that the sending mail server is authorized to send emails on behalf of a specific domain.
- How It Works: The domain owner publishes an SPF record in the DNS that lists the IP addresses or hostnames authorized to send emails for that domain. When an email is received, the recipient’s mail server checks this SPF record against the sender’s IP address.
- Main Function: Prevents unauthorized senders from using a domain (i.e., email spoofing).
2. DKIM (DomainKeys Identified Mail)
- Purpose: Ensures that the email content has not been altered in transit and verifies the sender’s identity.
- How It Works: The sending server adds a digital signature to the email header using a private key. The corresponding public key is published in the domain’s DNS records. The recipient’s server can use this public key to verify the signature.
- Main Function: Confirms the integrity of the email and the authenticity of the sender.
3. DMARC (Domain-based Message Authentication, Reporting, and Conformance)
- Purpose: Provides a framework for using both SPF and DKIM together and specifies how to handle emails that fail these checks.
- How It Works: Domain owners publish a DMARC record in the DNS that includes policies on how to handle emails that do not pass SPF or DKIM checks (e.g., reject, quarantine, or allow). DMARC also enables reporting back to the domain owner about authentication status.
- Main Function: Enhances the effectiveness of SPF and DKIM, allowing domain owners to manage their email authentication policy and receive feedback.
Summary
- SPF checks if the sender’s IP is authorized.
- DKIM verifies the integrity and authenticity of the email content.
- DMARC ties SPF and DKIM together and allows domain owners to dictate how to handle emails that fail authentication checks, along with providing reporting mechanisms.
How to Set Up DKIM, SPF, or DMARC
Setting up DKIM, SPF, or DMARC is a technical job best left to the experts. However, it is a crucial step to ensure that your emails are properly authenticated and delivered to your intended recipients. Here’s a general overview of how to set up each authentication method so you can run a SPF, DMARC, and DKIM check on your email.
DKIM
- Generate a public/private key pair for your domain.
- Create a DNS TXT record containing the public key.
- Use the private key to add a DKIM signature to your email messages.
- Configure your email server to use DKIM to sign outgoing email messages.
SPF
- Create a DNS TXT record for your domain listing the authorized IP addresses allowed to send email on your behalf.
- Add the “include” mechanism to your SPF record if you are using a third-party email service, such as Mailchimp or Gmail, to send email on your behalf.
- Test your SPF record to make sure it is correctly configured.
- Configure your email server to use SPF to validate incoming email messages.
DMARC
- Create a DMARC policy for your domain, specifying whether to reject, quarantine, or monitor email messages that fail authentication checks.
- Create a DNS TXT record containing your DMARC policy for your domain.
- Monitor your email traffic to identify any issues with your authentication setup.
- Configure your email server to send DMARC reports to your specified email address.
It’s important to note that the specific steps for setting up DKIM, SPF, and DMARC may vary depending on your email service provider and other technical details. It’s recommended to follow detailed instructions provided by your email provider or consult with an email security expert to ensure your authentication setup is configured correctly.
Conclusion: DKIM, SPF, DMARC
Ultimately, the best solution for your business will depend on your specific needs and requirements. It may be helpful to consult with an email security expert to evaluate your current email infrastructure and determine which product or solution will provide the greatest benefits for your organization.
For more information on SPF, DKIM, and DMARC, contact a member of the Mimecast team to discuss your specific requirements. Additionally, explore our blog for industry insights into today’s cybersecurity landscape.