Latest dealsDeals See all deals→
What Are SPF, DKIM, and DMARC? A Complete Email Authentication Guide

What Are SPF, DKIM, and DMARC? A Complete Email Authentication Guide

Spam Jadoo
Spam Jadoo
12 min read
What Are SPF, DKIM, and DMARC? A Complete Email Authentication Guide

Email is essential for business communication, but attackers can impersonate trusted domains to send phishing emails and fraudulent messages. SPF, DKIM, and DMARC are email authentication standards that help receiving mail servers verify sender identity and reduce domain spoofing.

SPF checks authorized sending servers, DKIM verifies a cryptographic signature, and DMARC checks domain alignment and defines a policy for authentication failures. Together, these technologies strengthen email security and support better email deliverability.

In this guide, learn how SPF, DKIM, and DMARC work, their key differences, how to configure them, and how they complement an email security gateway.

What Is Email Authentication?

Email authentication uses technical checks to evaluate whether an email's claimed identity is legitimate. Businesses use authentication to reduce domain impersonation, monitor unauthorized sending sources, and improve confidence in their email communications.

However, authentication does not guarantee inbox delivery or prove that a message is harmless. Receiving systems also consider sender reputation, message content, and other security signals.

What Is SPF (Sender Policy Framework)?

SPF identifies which mail servers are authorized to send email for a domain's envelope-sender identity. Domain owners publish an SPF policy in DNS as a TXT record, which receiving servers can evaluate against the connecting server's IP address.

SPF record example

example.com. TXT "v=spf1 ip4:192.0.2.10 -all"

Here, v=spf1 identifies the SPF version, ip4:192.0.2.10 authorizes an example IP address, and -all indicates that other sources are not authorized.

The IP address above is reserved for documentation and is not a production server.

Common SPF mistakes:

  • Publishing multiple SPF records for the same DNS name.
  • Forgetting legitimate email services.
  • Exceeding SPF's DNS lookup limit.
  • Authorizing the wrong sending sources.

Use SpamJadoo's free SPF Checker to inspect an SPF record and check its DNS lookup count. Always verify your actual email infrastructure before changing a record.

What Is DKIM (DomainKeys Identified Mail)?

DKIM uses a cryptographic signature to help receiving servers verify that an email was signed by a domain and that signed content has not been altered in a way that invalidates the signature.

The sending server signs the message using a private key. The corresponding public key is published in DNS.

A DKIM public key is typically published under a selector-based name such as:

selector1._domainkey.example.com

A simplified record may contain:

v=DKIM1; k=rsa; p=PUBLIC_KEY_VALUE

The key value is illustrative; use the actual key supplied by your email provider.

DKIM helps verify message integrity and supports DMARC authentication. It does not encrypt emails or guarantee that a message is trustworthy.

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

DMARC checks whether SPF or DKIM authentication passes with the required alignment to the domain shown in the email's visible From address. It also lets domain owners publish a policy and receive reports about authentication activity.

DMARC record example

_dmarc.example.com. TXT

"v=DMARC1; p=none; rua=mailto:[email protected]"

This example uses a monitoring policy. Replace the example domain and reporting address with values you control.

DMARC supports three main policies:

  • p=none: Monitor authentication without requesting quarantine or rejection through the DMARC policy.
  • p=quarantine: Request that failing messages be treated as suspicious.
  • p=reject: Request rejection of messages that fail DMARC.

A DMARC check can pass if either SPF or DKIM passes and aligns with the visible From domain. Passing SPF or DKIM alone is not sufficient when neither authenticated domain aligns.

For a deeper explanation of policies, alignment, and reports, read SpamJadoo's existing DMARC Explained: The Complete Guide.

SPF vs. DKIM vs. DMARC

FeatureSPFDKIMDMARC
Main purposeAuthorizes sending serversVerifies a cryptographic signatureChecks alignment and publishes policy
DNS recordSPF TXT recordPublic-key TXT recordDMARC TXT record
Main checkSending IP authorizationSignature validityAligned SPF or DKIM result
Key benefitHelps identify unauthorized sourcesHelps verify signed message integrityHelps address domain spoofing and provides reporting

These standards serve different purposes and work best together.

How Do SPF, DKIM, and DMARC Work Together?

Suppose a business sends an invoice from [email protected].

  1. SPF: The receiving server checks whether the sending IP is authorized for the relevant envelope-sender domain.
  2. DKIM: The server verifies the message signature using the public key published in DNS.
  3. DMARC: The server checks whether SPF or DKIM passes and aligns with example.com.
  4. Policy: If DMARC fails, the receiving server considers the domain's published policy alongside its own rules.
  5. Reporting: Configured DMARC aggregate reports help identify legitimate and unauthorized sending sources.

For the technical standards, see SPF (RFC 7208), DKIM (RFC 6376), and the current DMARC standard (RFC 9989).

How to Configure SPF, DKIM, and DMARC

Follow these steps, adapting them to your email provider and DNS host.

  1. Identify email sources: List business email, marketing platforms, website forms, transactional systems, and other services sending mail for your domain.
  2. Configure SPF: Authorize legitimate sending sources in a valid SPF record. Check for duplicate records and DNS lookup-limit issues.
  3. Enable DKIM: Obtain your provider's selector and public key, publish the DNS record, and enable message signing.
  4. Publish DMARC: Start with a monitoring policy such as p=none and configure a valid aggregate-report address.
  5. Review results: Inspect reports and message headers to identify authentication failures and domain-alignment problems.
  6. Enforce gradually: Consider quarantine or rejection only after confirming that legitimate business email authenticates correctly.

For provider-specific instructions, consult Google Workspace's DMARC guide and Microsoft's DMARC guidance.

Common Email Authentication Problems

ProblemPossible causeRecommended action
SPF failureSending source is not authorizedVerify the sending IP and envelope-sender domain
DKIM failureIncorrect key, selector, or signatureCheck DNS records and signing configuration
DMARC failureSPF and DKIM both fail alignmentReview authentication results and domain alignment
Legitimate email is quarantinedAuthentication failure or other filtering rulesInspect message headers and DMARC reports
Forwarded email fails SPFForwarding server is not authorized by the original SPF policyReview forwarding behavior and aligned DKIM

A failed authentication check does not automatically mean a message is malicious. Investigate the sending source and complete authentication results before changing policies.

How Does Email Authentication Work With an Email Security Gateway?

SPF, DKIM, and DMARC evaluate sender authentication and domain identity. An email security gateway can provide additional protection through controls such as connection filtering, sender reputation checks, spam detection, and, depending on the solution, message or attachment inspection.

SpamJadoo focuses on SMTP-level filtering, including rejecting qualifying unwanted messages during the SMTP conversation before the message body is transmitted. Authentication complements this approach rather than replacing it.

Learn how SpamJadoo rejects unwanted mail at the SMTP handshake and how it integrates with Microsoft 365, Google Workspace, Exchange, Postfix, and other mail systems.

Businesses looking for organizational deployment options can explore SpamJadoo's enterprise email security solution. For pricing and deployment models, visit the SpamJadoo pricing page.

Frequently Asked Questions

1. What are SPF, DKIM, and DMARC in simple terms?

SPF checks authorized sending servers, DKIM verifies a cryptographic signature, and DMARC checks alignment with the visible From domain and defines a policy for failures.

2. Do businesses need all three?

Using all three is a strong security practice because they provide complementary protections against email-domain abuse.

3. Can DMARC pass if SPF fails?

Yes. DMARC can pass if DKIM passes and aligns with the visible From domain.

4. Does DKIM encrypt email?

No. DKIM verifies a cryptographic signature; it does not encrypt the message.

5. Should I start with p=none or p=reject?

Monitoring with p=none is a common starting point. Enforce stricter policies only after reviewing legitimate sending sources and fixing authentication issues.

6. Do SPF, DKIM, and DMARC guarantee inbox delivery?

No. Delivery also depends on sender reputation, content, recipient engagement, and receiving-provider filtering.

7. How can I check my SPF record?

Use the SpamJadoo SPF Checker to inspect the record and DNS lookup count. Check DKIM and DMARC configuration separately as well.

Conclusion

SPF, DKIM, and DMARC form essential parts of modern email authentication. Correct configuration helps businesses verify sending sources, detect domain impersonation, and monitor authentication failures.

Combined with a properly configured email security gateway, these standards support a stronger, layered email security strategy.

Protect your business email with SpamJadoo. Explore our enterprise email security solution, review available plans, or request a demo.

More from Spam Jadoo

View all →

Similar Reads

Browse topics →

More in How To

Browse all in How To →

Discussion (0 comments)

0 comments

No comments yet. Be the first!