Blog/Enterprise security

Email security for organizations: SPF, DKIM, DMARC and beyond

What SPF, DKIM and DMARC each actually prove, how to deploy them without blocking your own mail, and where gateways and encryption stop helping.

CyberWatch AI22 November 2026 · 11 min read
A server rack with network cables and status lights in a technical room

A supplier calls to ask why their invoice has not been paid. It was paid, three weeks ago, to the account in the email. The supplier never sent that email. The finance team pulls the message and checks the headers: SPF pass, DKIM pass, DMARC pass. Everything authenticated correctly, because the message really did come from the supplier's domain, sent from the supplier's own mailbox by someone who had the password.

That outcome is worth sitting with, because it defines what email authentication is for and what it cannot do. SPF, DKIM and DMARC are excellent at answering the question "did this message really come from the domain it claims?" They have nothing to say about whether the person at the keyboard was supposed to be there.

Deploy them anyway. Then build the controls that cover what they miss.

The three records, properly explained

Email was designed without authentication. Anyone can connect to a mail server and claim to be sending on behalf of any domain. The three mechanisms below were bolted on afterwards to fix that, each solving a different piece of the problem.

SPF: which servers may send for your domain

SPF is a DNS record listing the mail servers authorized to send on your domain's behalf. A receiving server compares the connecting server's IP address against that list and gets a pass or a fail.

What matters in practice:

  • SPF checks the envelope sender, the address used in the SMTP transaction, not the From address the recipient sees. Those are often different, which is precisely the gap DMARC exists to close.
  • SPF breaks when mail is forwarded. A forwarded message arrives from the forwarding server, which is not on your list, so it fails. This is normal, expected, and the reason you should not rely on SPF alone for enforcement.
  • There is a ten-lookup limit. Each include in your record can trigger further lookups, and exceeding ten causes a permanent error that can be treated as a fail. Organizations with many sending services hit this regularly and need to flatten or consolidate.
  • End with a hard fail. A record ending -all states that anything not listed is unauthorized. ~all is a soft fail and is a reasonable intermediate step while you find your senders.

The hardest part of SPF is not the syntax. It is discovering every service that legitimately sends mail as you: the marketing platform, the invoicing system, the helpdesk, the HR tool, the CRM, the monitoring alerts, the recruitment portal and whatever a department bought last year.

DKIM: a signature proving the message was not altered

DKIM adds a cryptographic signature to outgoing messages, created with a private key held by your mail system. The matching public key is published in DNS. A receiving server verifies the signature, which proves the message was signed by someone holding the key for that domain and that the signed parts were not modified in transit.

What matters in practice:

  • DKIM survives forwarding in most cases, because the signature travels with the message. This makes it more reliable than SPF as the basis for enforcement.
  • Every sending service needs its own key published under its own selector, so the discovery problem from SPF applies here too.
  • Rotate keys periodically and use a key length of at least 2048 bits.
  • DKIM proves the signing domain, which is not necessarily the domain in the From header. Again, DMARC is what connects them.

DMARC: alignment, policy and reporting

DMARC does three things that make the first two useful.

Alignment. It requires that the domain which passed SPF or DKIM matches the domain in the From header that the recipient actually sees. Without alignment, an attacker can pass SPF for their own domain while displaying yours. Alignment is the part that turns authentication into anti-spoofing.

Policy. It tells receiving servers what to do when a message claiming your domain fails: p=none (do nothing, just report), p=quarantine (treat as suspicious) or p=reject (refuse delivery).

Reporting. Receivers send you aggregate reports showing who is sending mail claiming to be your domain, from where, and whether it passed. These reports are the whole value of the early deployment phase, and they are the only practical way to find your own forgotten senders.

How to deploy without blocking your own mail

The failure mode here is predictable: an enthusiastic move straight to p=reject, followed by a week of discovering that the invoicing system, the payroll notifications and the Christmas newsletter all stopped arriving. Work through it in order.

  1. Inventory your senders. Ask every department what sends email as the company. You will miss some; that is what the reports are for.
  2. Publish SPF and DKIM for each legitimate sender. Use a soft fail on SPF at this stage.
  3. Publish DMARC at p=none with a reporting address. Use a service or tool to parse the aggregate reports, because raw XML at volume is not readable by hand.
  4. Read the reports for several weeks. Separate genuine senders that are failing from actual abuse. Fix the former.
  5. Move to p=quarantine, initially on a percentage of mail if you want a gentler ramp, and keep watching reports.
  6. Move to p=reject once the legitimate failures are gone.
  7. Cover every domain you own, including subdomains and the parked domains you never send from. An unused domain with no DMARC record is a free spoofing opportunity, so publish a reject policy on domains that should never send mail at all.

Our article on email authentication explained covers the record syntax in more detail, and the NCSC's anti-spoofing guidance is a good deployment reference.

While you are in DNS: MTA-STS and TLS reporting

Transport encryption between mail servers is normally opportunistic, which means it can be stripped by an attacker in a position to interfere. MTA-STS lets you publish a policy stating that senders must use authenticated TLS to reach you, and TLS reporting gives you visibility of failures. Both are modest, low-maintenance improvements that close a real gap, and both are worth doing once the authentication records are stable.

What authentication does not cover

This is the part that gets left out of deployment projects, and it is where the actual losses happen. MITRE ATT&CK catalogs phishing as an initial access technique precisely because the delivery mechanism is adaptable, and none of these variants fail an authentication check.

  • Lookalike domains. An attacker registers a domain resembling yours or your supplier's, with a swapped letter, an added hyphen or a different top-level domain, and publishes perfect SPF, DKIM and DMARC for it. Everything passes, because the mail genuinely comes from that domain. See lookalike domains and typosquatting.
  • Display-name impersonation. A free email account with the display name "Sarah Okoye, Finance Director". On a phone, the address is often hidden entirely and only the name shows.
  • Compromised real mailboxes. The case from the opening. Authentication passes because the sender is genuine. This produces the largest losses, and no DNS record addresses it.
  • Reply-to redirection. A message from a plausible address with a reply-to pointing somewhere else, so the conversation moves to the attacker on the first reply.
  • Thread hijacking. A reply inserted into a real ongoing conversation, inheriting all the trust the previous messages built. See reply chain phishing.
  • Mail that is not technically malicious at all. No link, no attachment, no code. A short, well-written request to change a bank account. There is nothing for a filter to detect. This is the subject of our business email compromise guide.

The practical consequence: email authentication protects your domain's reputation and stops the cheapest class of attack. It is necessary and insufficient.

Secure email gateways and what to expect from them

A secure email gateway filters mail before or after it reaches your mail platform. The honest assessment in most organizations is that the question is no longer whether to filter, but whether a third-party gateway adds enough on top of what the mail platform already includes.

What the filtering layer does well

  • Bulk malware and known-bad content. Attachment scanning, sandboxing of files in a safe environment, and blocking of known malicious senders and infrastructure.
  • Link protection. Rewriting URLs so they are checked at the moment of click rather than at delivery, which matters because attackers commonly activate a page after the message has passed inspection.
  • Attachment type policy. Blocking executable content, script files, disk images and password-protected archives that cannot be inspected. Our articles on dangerous email attachments and password-protected archive phishing cover why these matter.
  • Impersonation detection. Rules that flag display names matching your executives, newly registered sender domains, and domains visually similar to yours or your suppliers'.
  • Post-delivery removal. The ability to pull a message out of every mailbox it reached once it is identified as malicious. This is one of the most operationally valuable features and is often underused.

What it does less well

  • Malware-free fraud. A plain text request with no link cannot be detected by content analysis, only by behavioral anomaly detection that looks at whether this sender normally writes to this recipient about this subject.
  • Mail from compromised trusted senders, particularly when the sender is in your contacts and the message sits inside an existing thread.
  • Internal mail, if the gateway only inspects what crosses the perimeter. A takeover of one mailbox followed by mail to colleagues bypasses it entirely, which ATT&CK records as internal spearphishing. Check whether your configuration inspects internal messages.

Choosing and configuring

Before buying, list what your current platform already does at the license level you hold, then identify what you specifically still need. If you do add a gateway, configure it to inspect internal mail where possible, enable post-delivery removal, and make sure the quarantine is reviewed by someone, because an unmonitored quarantine quietly becomes a place legitimate mail goes to die. Our article on email filters covers the tuning side, and layered phishing defense covers how filtering fits with everything else.

Encryption: two different things with the same name

Transport encryption protects a message as it moves between mail servers. It should be enforced rather than opportunistic where you can, which is what MTA-STS is for. It is invisible to users, requires no training, and is the right default.

End-to-end message encryption protects the content so only the intended recipient can read it, typically using S/MIME or PGP. It is genuinely strong and genuinely awkward:

  • Both parties need keys and compatible software, which is a recurring support burden.
  • Lost keys mean unrecoverable mail, including mail you may need for legal or audit purposes.
  • Your own security tooling cannot inspect encrypted content, so you lose scanning on exactly the messages you most want to protect.
  • Metadata, including who corresponded with whom and when, remains visible.

The pragmatic position for most organizations: enforce transport encryption generally, use a secure portal or secure file sharing for sensitive documents rather than attaching them, and reserve end-to-end message encryption for specific exchanges where it is genuinely required. Attaching sensitive files to email at all is worth questioning before reaching for encryption to make it safe.

The controls that cover the gap

Given what authentication and filtering cannot do, these are the measures that address the remainder, roughly in order of value.

  1. Phishing-resistant multi-factor authentication on every mailbox. Hardware keys or passkeys resist the real-time proxy attacks that defeat one-time codes. Start with finance, payroll, procurement, executives and administrators. Most serious email-based loss begins with a mailbox takeover, so this is the highest-value control on the page. See passkeys against phishing.
  2. Alert on new mail forwarding and hiding rules. Almost every mailbox compromise involves a rule that forwards or hides messages containing words like invoice and payment. This detection is cheap and high-signal. See malicious email rules and email forwarding rules.
  3. Block legacy authentication protocols that bypass modern sign-in controls, and alert on attempts.
  4. Review application consents. An attacker who cannot beat multi-factor authentication may instead persuade a user to grant a malicious app access to their mailbox. See consent phishing.
  5. Out-of-band verification for payments. Any new or changed payee confirmed by a call to a number already on file. This is the control that would have stopped the opening scenario, and no email control would have.
  6. Register and monitor lookalike domains for your own brand, and monitor new registrations resembling it.
  7. One-click reporting, with a response. Staff reporting is your detection layer for everything the filters miss. Our report button and security awareness training articles cover making it work.
  8. Mailbox audit logging switched on and retained, because after a takeover the first question is what the attacker read, and you cannot answer it retrospectively without logs.

Not sure whether an email is genuine? Paste it into CyberWatch AI Scan for a free check, and verify any payment change by calling a number you already hold.

A sensible order of work

  1. Phishing-resistant multi-factor authentication on all mailboxes, prioritizing finance and administrators.
  2. Block legacy authentication. Alert on external forwarding rules and new app consents.
  3. Inventory sending services. Publish SPF and DKIM for all of them.
  4. DMARC at p=none with report parsing, then quarantine, then reject. Publish reject on domains that never send mail.
  5. Enable MTA-STS and TLS reporting.
  6. Review filtering configuration: internal mail inspection, link protection, attachment policy, impersonation rules, post-delivery removal, quarantine ownership.
  7. Deploy a one-click report button and commit to acknowledging every report.
  8. Write the payment verification rule and have leadership endorse it.
  9. Confirm mailbox audit logging is enabled with adequate retention.
  10. Register the obvious lookalike domains and set up monitoring for new ones.

The short version

SPF says which servers may send for you. DKIM proves a message was signed by your domain and not altered. DMARC makes those checks apply to the address people actually see, tells receivers what to do on failure, and reports who is sending as you. Deploy all three to reject, carefully, using the reports to find your own senders first. Add MTA-STS so transport encryption cannot be stripped.

Then accept the limit. None of it stops a lookalike domain, a display name on a free account, or a real message from a supplier whose password was stolen. Those are stopped by multi-factor authentication on mailboxes, alerting on mail rules, staff who report quickly, and a payment process that requires a phone call before money moves to a new account.

For the wider program this sits inside, see our guides to phishing and how to defend against it and business cybersecurity.

Frequently asked questions

What do SPF, DKIM and DMARC do?

SPF lists which servers may send mail for your domain. DKIM adds a cryptographic signature proving a message came from your domain and was not altered. DMARC ties them to the address recipients actually see, tells receivers what to do when checks fail, and sends you reports.

Do SPF, DKIM and DMARC stop phishing?

They stop someone sending mail that appears to come from your exact domain. They do nothing about lookalike domains, free email accounts with your executive's display name, or mail from a genuinely compromised mailbox, which is the most damaging case.

What DMARC policy should we use?

Reject, eventually. Start at none to collect reports, fix every legitimate sending service you discover, move to quarantine, then to reject. Jumping straight to reject without reading reports is how organizations block their own invoices and newsletters.

Why did our email still get spoofed with DMARC in place?

Common causes are a policy of none rather than reject, a subdomain not covered, mail sent from a lookalike domain rather than yours, display-name impersonation from a free account, or a message from a real compromised mailbox on your own domain, which passes every check legitimately.

Is a secure email gateway still worth buying?

It depends what your mail platform already does. Modern cloud mail providers include substantial filtering, and a third-party gateway adds value mainly through different detection, specific features you need, or consolidated control across platforms. Compare against what you already own before buying.

Should we encrypt email?

Transport encryption between mail servers should be enforced and is largely invisible. End-to-end message encryption is worth it for specific sensitive exchanges, but it is awkward to use at scale and it blocks your own security scanning, so apply it selectively.

Do external sender warning banners work?

Modestly, and they fade fast when every message carries one. They are more useful when reserved for genuinely unusual conditions, such as a first-time sender, a display name matching an internal employee, or a reply-to address that differs from the sender.

What is BIMI and do we need it?

BIMI displays a verified brand logo beside authenticated messages in supporting mail clients. It requires DMARC at enforcement and usually a registered trademark and a verified mark certificate. It is a brand and deliverability measure rather than a security control.

What single email control gives the most protection?

Phishing-resistant multi-factor authentication on every mailbox. Most serious email-based loss starts with a mailbox takeover, and that is the control which prevents it.

Sources

  1. RFC 7208: Sender Policy Framework (SPF) for Authorizing Use of Domains in Email, Version 1, IETF
  2. RFC 6376: DomainKeys Identified Mail (DKIM) Signatures, IETF
  3. RFC 7489: Domain-based Message Authentication, Reporting, and Conformance (DMARC), IETF
  4. RFC 8461: SMTP MTA Strict Transport Security (MTA-STS), IETF
  5. RFC 8460: SMTP TLS Reporting, IETF
  6. Email security and anti-spoofing, UK National Cyber Security Centre
  7. SP 800-177 Rev. 1, Trustworthy Email, NIST
  8. How email authentication works in Microsoft 365, Microsoft
  9. Overview, dmarc.org
  10. Phishing, Technique T1566 - Enterprise, MITRE ATT&CK
Share this article
LinkedIn WhatsApp X
For organizations

Your people get these messages at work too.

CyberWatch AI sends your staff realistic practice attacks, trains the gaps it finds, and shows management exactly where the organization stands.