Complete Guide to Email Authentication: SPF, DKIM, DMARC, and Best Practices

email authentication

Email is a crucial communication channel for businesses, organizations, and individuals alike. Unfortunately, it’s also a prime target for scammers, spammers, and hackers. To protect against these threats, email authentication protocols like SPF, DKIM, and DMARC have been developed. By implementing these protocols, you can help protect your domain from email spoofing, phishing attacks, and other types of email fraud.

email authentication

What are the three types of Email Authentication?

In this guide, we’ll take an in-depth look at SPF, DKIM, and DMARC, and explain how they work together to provide strong email authentication. We’ll also cover best practices and provide examples of optimal records to help ensure that your email is properly authenticated and delivered. Whether you’re an IT professional, an email marketer, or just looking to protect your email, this guide will provide you with everything you need to know about email authentication.

What does SPF stand for

Sender Policy Framework (SPF) is a type of email authentication that allows email servers to verify that incoming messages are actually from the domain they claim to be from. SPF works by adding a special DNS record to a domain’s DNS settings. This record lists all of the authorized sending servers for that domain.

When an email server receives a message, it can check the SPF record for the domain in the “From” address to see if the server that sent the message is authorized. If the sending server is not authorized, the receiving server can reject the message or mark it as spam.

Here’s an example of what an SPF record might look like:

v=spf1 ~all

This record allows Google’s email servers to send emails on behalf of the domain, but any other servers will be treated as “soft” failures.

Best practices for SPF include:

  • Use a dedicated domain for your email sending. This makes it easier to manage your SPF record and avoid conflicts with other services that may be using your domain.
  • Include all of your authorized sending servers in your SPF record. This includes any third-party services you may be using to send email.
  • Use the “-all” qualifier in your SPF record to reject any messages that don’t come from authorized servers.
  • Regularly monitor your SPF record to ensure it is up-to-date and accurate.

There are several online tools that you can use to check your SPF record and identify any issues. Here are a few that you might find helpful:

  1. SPF Record Testing Tools by dmarcian This tool provides a comprehensive SPF survey of your domain and identifies potential issues that could impact email deliverability.
  2. SPF Record Checker by MXToolbox MXToolbox’s SPF Record Checker allows you to check your SPF record syntax and provides detailed information about your SPF record, including any errors or warnings.
  3. SPF Record Validation by DMARC Analyzer DMARC Analyzer’s SPF Record Validation tool checks the syntax of your SPF record and provides feedback on any errors or issues that might impact email deliverability.
  4. SPF Record Checker by This tool checks the syntax of your SPF record and provides detailed information about your SPF record, including any errors or warnings that could impact email deliverability.

By using one of these tools, you can quickly identify any issues with your SPF record and take steps to correct them.

What is DKIM?

DomainKeys Identified Mail (DKIM) is another type of email authentication that uses digital signatures to verify the authenticity of incoming messages. DKIM works by adding a special signature to the header of the message that can be verified by the recipient’s email server.

To use DKIM, you’ll need to generate a public and private key pair for your domain. The public key is added to your domain’s DNS settings as a special TXT record. The private key is kept secure and used to sign outgoing messages.

When an email server receives a message with a DKIM signature, it can check the signature against the public key in the domain’s DNS settings to verify that the message was sent by the domain it claims to be from.

Here’s an example of what a DKIM signature might look like:

DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; s=mail; t=1528867488;

Best practices for DKIM include:

  • Use a strong cryptographic

What is a DMARC record

A DMARC (Domain-based Message Authentication, Reporting, and Conformance) record is a type of DNS (Domain Name System) record that helps protect email domains from being used for email spoofing, phishing, and other unauthorized activities. It works in conjunction with two other email authentication mechanisms: SPF (Sender Policy Framework) and DKIM (DomainKeys Identified Mail).

Understanding DMARC’s Role in Email Authentication

DMARC allows domain owners to specify policies for handling emails that fail authentication checks. These policies typically include options such as monitoring (sending reports about authentication results), quarantining (placing suspicious emails in the recipient’s spam/junk folder), or rejecting (blocking suspicious emails outright).

To use DMARC, you’ll need to add a special DNS record to your domain’s DNS settings. This record includes information on how email servers should handle messages that fail SPF and/or DKIM checks.

How DMARC Works in Practice:

When an email server receives a message with a DMARC record, it checks to see if the message passes SPF and DKIM checks. If the message passes both checks, it is delivered normally. If the message fails one or both checks, the email server checks the DMARC record to see what action to take.

Here are the possible actions specified by a DMARC record:

  • None: The email server takes no action and simply delivers the message as normal.
  • Quarantine: The email server marks the message as spam or junk and may deliver it to the recipient’s spam folder.
  • Reject: The email server outright rejects the message and does not deliver it to the recipient.

Here’s an example of what a DMARC record might look like:

v=DMARC1; p=reject; sp=reject;;;

This record specifies that messages that fail both SPF and DKIM checks should be rejected and not delivered. It also includes an email address where reports of failed messages should be sent.

Best practices for DMARC include:

  • Start with a “none” policy and monitor DMARC reports to ensure your legitimate email is passing authentication checks before moving to “quarantine” or “reject” policies.
  • Use DKIM and SPF in combination with DMARC for maximum protection.
  • Ensure that all authorized sending domains have valid SPF and DKIM records in place.
  • Regularly review DMARC reports to identify any unauthorized use of your domain and to address any issues with your authentication configuration.

There are several websites where you can perform DMARC (Domain-based Message Authentication, Reporting, and Conformance) checks to analyze and validate your email authentication setup. Here are a few options:

  1. DMARC Analyzer: This tool provides a comprehensive DMARC check and reporting service. You can input your domain and receive detailed analysis and recommendations. Visit their website at
  2. MXToolbox: MXToolbox offers various email and network diagnostic tools, including a DMARC analyzer. You can input your domain and receive a report on your DMARC setup and potential issues. Check it out at
  3. The organization behind DMARC provides a simple tool for checking DMARC records. You can visit their website at
  4. EasyDMARC: EasyDMARC offers a DMARC checker along with other email security tools. You can input your domain and receive a detailed DMARC report. Visit their website at
  5. Dmarcian: Dmarcian provides DMARC services including analysis and reporting. They offer a DMARC checker tool on their website. You can access it at

By implementing SPF, DKIM, and DMARC, you can help protect your domain from email spoofing and phishing attacks while improving your email deliverability. Be sure to follow best practices and regularly monitor your authentication configuration to ensure that it remains accurate and up-to-date.

Here are some additional elements that you should care about your SPF, DKIM, DMARC

Common challenges and troubleshooting tips:

  • One common issue that people encounter with SPF is that they might have multiple SPF records published for the same domain, which can cause conflicts and lead to email deliverability problems. To avoid this, it’s important to consolidate all of your SPF records into a single record and to test your SPF record thoroughly to ensure that it’s working correctly.
  • With DKIM, a common issue is that the private key used to sign email messages may expire or become invalid, which can cause email authentication failures. To avoid this, make sure to keep your private key secure and up-to-date, and to monitor your DKIM authentication logs regularly to catch any issues before they become critical.
  • DMARC can also present some challenges, particularly when it comes to interpreting the DMARC aggregate and forensic reports. To make sense of these reports, it’s important to have a clear understanding of the data that’s being presented and to use a tool like DMARC Analyzer or Agari to help you interpret the reports and identify any potential issues.

Integration with email service providers

  • If you’re using an ESP like Mailchimp, Constant Contact, or SendGrid, it’s important to ensure that your email authentication records are properly set up in your account. Most ESPs have built-in tools that make it easy to set up SPF, DKIM, and DMARC authentication, but it’s important to double-check that everything is working correctly. For example, you might need to add a custom DNS record for your DKIM public key or configure your DMARC policy to receive aggregate and forensic reports.
  • Another important consideration when using an ESP is to make sure that your email content and sending practices are aligned with best practices for email authentication. For example, you should avoid sending emails from non-existent or unverified email addresses, and make sure that your email content is high-quality and relevant to your audience.

Real-world examples and case studies

  • One recent example of how DMARC can prevent phishing attacks is the case of the UK National Health Service (NHS). In 2020, the NHS implemented DMARC authentication for their email domains, which helped to prevent a large-scale phishing attack that was targeting NHS staff. By using DMARC to block unauthorized email senders and alert IT administrators to potential threats, the NHS was able to prevent the attack from succeeding and protect its staff from harm.
  • Another success story comes from the global marketing agency, Wunderman Thompson. In 2020, Wunderman Thompson implemented SPF, DKIM, and DMARC authentication for their email domains, which helped to significantly improve their email deliverability rates and reduce the risk of email fraud. By taking a proactive approach to email authentication and aligning its email-sending practices with best practices, Wunderman Thompson was able to enhance their reputation as a trusted and reliable sender of email messages.

Setting up SPF, DKIM, and DMARC in Office 365

For Office 365 users, configuring SPF involves adding a TXT record with the necessary information to the domain’s DNS settings. DKIM setup entails generating DKIM keys through the Exchange admin center and adding the generated CNAME records to DNS settings. To implement DMARC, add a TXT record specifying the DMARC policy to your domain’s DNS settings. Regularly reviewing and updating these settings is crucial for ensuring optimal email authentication and security within the Office 365 environment.

In conclusion, the amalgamation of SPF, DKIM, and DMARC plays a pivotal role in safeguarding email integrity. Regular checks, adherence to best practices, and integration with ESPs contribute to a comprehensive and effective email authentication strategy. As the digital landscape evolves, staying vigilant and proactive in maintaining robust email security becomes paramount.

About Author

Pavlos Papadopoulos Avatar

Discover more from Gadget Rumours

Subscribe to get the latest posts to your email.

2 responses to “Complete Guide to Email Authentication: SPF, DKIM, DMARC, and Best Practices”

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Recent Posts

Discover more from Gadget Rumours

Subscribe now to keep reading and get access to the full archive.

Continue reading