How and Why Use SPF, DMARC and DKIM for Your Email Security and Deliverability?

| | 3 min read

Ensuring the security and deliverability of emails from your business mail accounts is important. SPF, DKIM, and DMARC represent the three pillars of email security and deliverability. But what are they, and how do they shield you from potential email threats?

Understand The Role of SPF, DKIM, and DMARC



SPF (Sender Policy Framework)

SPF ensures only specific IP addresses or servers can send emails using your domain. In essence, it works to verify the sender's identity, reducing the chances of email spoofing. Most email servers validate SPF records and make sure that the IP of the email sender is matching with the one mentioned in the domain name SPR record.

DKIM (DomainKeys Identified Mail)

This mechanism ensures the integrity of the message. It confirms the email has not been tampered with since its dispatch, promoting trust in the message's content.

DMARC (Domain-based Message Authentication, Reporting, and Conformance) 

Think of DMARC as the bridge between SPF and DKIM. It ties these methods together, setting a policy on treating the email if it fails SPF or DKIM checks.



Why Use Them? 

Phishing scams, malicious attachments, and deceptive links fill the inbox of unsuspecting users daily. By leveraging SPF, DKIM, and DMARC, domain owners can significantly reduce the chances of their domain being used for such malicious purposes. Most email services and servers validate these records and if the email does not have a valid record, the email deliverability can be affected.

How To Setup SPF, DKIM, and DMARC?

Set up SPF

  • Identify Outgoing Mail Servers: List down the IP addresses of all servers and services (like ESPs) that send emails on behalf of your domain.
  • Create Your SPF Record: Construct an SPF record. A basic example looks like this: v=spf1 ip4:XXX.XXX.XXX.XXX -all. Replace XXX.XXX.XXX.XXX with your server's IP address.
  • Add to DNS: Add the SPF record to your domain's DNS as a TXT record.

Set up DKIM

  • Generate DKIM Key: Most email servers and email service providers offer a way to generate the necessary public and private keys.
  • Insert the Public Key into DNS: The public key gets added to your domain's DNS records as a TXT record. This allows receiving servers to decrypt the signature and verify the email's integrity.
  • Configure Your Email Server: Configure your email server to sign outgoing messages with the private key.

Set up DMARC

  • Review SPF & DKIM: Ensure that both SPF and DKIM are correctly set up.
  • Create DMARC Record: Construct a DMARC record. A basic example looks like this: v=DMARC1; p=none; rua=mailto:[email protected]. Here, p=none means no specific action is mandated (options include none, quarantine, or reject), and rua specifies where aggregate reports should be sent.
  • Add DMARC to DNS: Add your DMARC record to your domain's DNS as a TXT record, typically in the format

After implementing SPF, DKIM, and DMARC, use online tools to verify your setup. You can use dmarcian domain checker for SPF, DKIM, and DMARC lookup and verification. Monitor DMARC reports regularly to gain insights into your email delivery and any potential issues.

Implementing SPF, DKIM, and DMARC might seem complex, especially if you're new to DNS configurations. Depending on your email server or service, specific steps might differ slightly, so always refer to the official documentation provided by your email solution. If you need support setting up any of these, please contact us.