Outbound Wiki

Email authentication

SPF, DKIM and DMARC: what each proves, how to set them up and how to check they hold.

Email authentication uses three checks: SPF identifies authorized sending servers, DKIM signs messages so tampering can be detected, and DMARC tells receiving systems how to handle mail that fails.1 The most common setup failure is putting the records in the wrong order.2 Enable SPF and/or DKIM before DMARC. Enabling DMARC first will probably create delivery issues.34 Build one layer, check that it works, then use the result to decide what needs fixing.

Know what you are setting up

Before changing DNS, know what each layer does. That gives you a direct way to diagnose a failed message.

SPF lists the mail servers allowed to send for your domain, and receiving systems compare the sending server's IP with that list.5

DKIM adds a cryptographic signature to outgoing messages. Receiving systems verify it against a public key published in DNS, which lets them detect changes made in transit.6

DMARC defines the policy receiving systems should follow when SPF or DKIM fails. It also reports who is sending mail as your domain.7

Build the records in order

  1. Sending domain and sources
  2. Publish SPF
  3. Publish DKIM
  4. Add DMARC

Start with the sending identity. List the systems that send mail, publish the records they need, and add the receiver policy after the earlier checks are available.

Choose the sending domain and sources

List every system that sends mail using the domain, including normal business mail and outbound systems that send on its behalf. This keeps the SPF and DKIM setup aligned with the traffic you intend to send.

For cold email, send from a subdomain instead of the apex domain.8 Keep a list of the systems allowed to send as that domain, along with an owner and a documented sending path.

Publish SPF

Publish an SPF TXT record at the root of the domain. It identifies the authorized sending servers.9 Add it through the DNS provider that controls the domain. Providers often use different procedures for SPF and DKIM records, so follow the registrar's instructions or contact its support team when the publishing screen or record format is unclear.10

After publishing, confirm that the listed sources match the systems you intend to use. If a legitimate sender is missing, fix the sending inventory before adding the next layer.

Publish DKIM

Enable DKIM for each sending system that will sign mail. Publish its public key in a selector-based TXT hostname so receiving systems can find and verify the signature.11

Confirm that the selector record exists for every intended signer and matches the domain and sending system you documented.

Add DMARC

Add DMARC only after the earlier authentication checks are available. Set it up with a DMARC DNS TXT record12 at the _dmarc hostname.13

Choose what receiving systems should do when a message fails the required authentication checks. The options are reject, quarantine, or deliver the message.14 Receiving servers consult the DMARC record when mail from the domain fails SPF or DKIM, then apply the published action.15

Check that the setup holds

Validation has two parts: confirm that the records are published where receiving systems expect them, then see what happens to mail from each intended source.

Check the SPF record at the domain root, the DKIM record at the selector hostname, and the DMARC record at the _dmarc hostname. This gives you a first check before you investigate a message or report.

Send a test message from each documented sending path. Review the authentication information for a missing source, an unexpected sender, or a failed check. If a result is unclear, trace it back to the sending system and the record that should authorize or sign it.

Use DMARC reports to find possible authentication issues and malicious activity involving messages sent from the domain.16 Treat each report as both a source inventory and a failure notice. Reconcile legitimate sources with your SPF or DKIM setup, and investigate unfamiliar ones before changing the policy.

DMARC combines the checks. It requires alignment with SPF or DKIM, applies the published policy when both fail, and reports the result to the domain owner.17 A passing check in isolation does not settle the result for the whole message. Follow the report back to the source and correct the record or sending configuration that explains the failure.

What not to do

Avoid these mistakes:

  • Do not enable DMARC before SPF and/or DKIM. Messages sent from the domain will probably have delivery issues when those checks are missing.4
  • Do not stop at DKIM. DKIM alone cannot prevent spoofing of the domain, so SPF and DMARC still need to be configured.18
  • Do not publish an isolated record and call the domain covered. SPF, DKIM, and DMARC need to work together for effective email authentication.19
  • Do not guess the DNS provider's record procedure. Check its instructions or contact its support team when adding SPF or DKIM.10

Tool for this

Sending from your own mailboxes, safely paced

Intedat covers the basics here properly. It sends from the Gmail, Microsoft 365 or SMTP mailbox you already own, shows SPF, DKIM and DMARC checks for a custom domain and rechecks them, and the daily limit per mailbox tops out at 100 inside a sending window you set per workflow. It will not warm a mailbox up for you, so that part stays your job.

Open Intedat

Sources

  1. 1
    “SPF lists which servers may send for your domain, DKIM signs messages so tampering is detectable, and DMARC tells receivers how to handle mail that fails.”
  2. 2
    “Doing them in the wrong order is the single most common reason a setup that “should work” doesn’t.”
  3. 3
    “You must turn on SPF and/or DKIM for your domain before you can use DMARC.”
  4. 4
    “If you don't set up SPF and/or DKIM before enabling DMARC, messages sent from your domain will probably have delivery issues.”
  5. 5
    “SPF (Sender Policy Framework) — the list of mail servers allowed to send mail on behalf of your domain. Receivers check the sending server’s IP against this list.”
  6. 6
    “DKIM (DomainKeys Identified Mail) — a cryptographic signature added to every outgoing message, signed with a private key, verified by receivers against the public key you publish in DNS. Proves the message wasn’t altered in transit.”
  7. 7
    “DMARC (Domain-based Message Authentication, Reporting & Conformance) — the policy receivers should follow when SPF or DKIM fail, plus a reporting mechanism that tells you who’s sending mail as you (legitimate or otherwise).”
  8. 8
    “Send cold from a subdomain, not your apex.”
  9. 9
    “SPF Did this message come from a server I authorized? TXT record at your root domain You”
  10. 10
    “The way the SPF records need to be added often varies with different DNS Providers.  Hence it is recommended to check the help pages or instruction manuals of your registrar or reach out to the support team of your DNS provider, to add the respective SPF/ DKIM records.”
  11. 11
    “DKIM Was this message altered after it left my server? TXT at default._domainkey.yourdomain.com You”
  12. 12
    “Set up DMARC by adding a DMARC DNS TXT record (DMARC record) to your domain.”
  13. 13
    “DMARC What should the receiver do when SPF or DKIM fails? TXT at _dmarc.yourdomain.com You”
  14. 14
    “The action options are reject, quarantine, or deliver the message.”
  15. 15
    “When receiving servers get email messages from your domain that don't pass SPF or DKIM, they check your DMARC record to determine what action to take on the messages: Reject, quarantine, or deliver normally.”
  16. 16
    “You can also get reports that help you identify possible authentication issues and malicious activity for messages sent from your domain.”
  17. 17
    “DMARC ties them together: align with SPF or DKIM, follow the published policy when both fail, and report the result back to the domain owner.”
  18. 18
    “DKIM alone isn't enough to prevent spoofing of your Microsoft 365 domain. You also need to configure SPF and DMARC for the best possible protection.”
  19. 19
    “Internet domains need SPF, DKIM, and DMARC to work together for effective email authentication.”