Free tech learning for everyone, from basics to pro

Photo: Miguel Ángel Padriñán Alba on Unsplash

ExplainersBeginner

DMARC, SPF and DKIM explained: how email proves who sent it

In short: SPF lists which servers may send email for your domain. DKIM adds a digital signature to each email. DMARC checks that SPF or DKIM passes for the domain in the visible From address, tells receiving servers what to do with failures (none, quarantine or reject) and sends you reports. Together they make it much harder for scammers to spoof your domain, and large email providers now expect them.

Animation: the main idea at a glance. It plays on a loop with no sound.

Why email needs proof

Email was designed decades ago without a built-in way to prove who sent a message. Anyone can type any "From" address, which is why scammers can send emails that appear to come from your bank, your boss or your own company. Three standards now fix much of this: SPF, DKIM and DMARC. All three are published as simple text records in your domain's DNS (see What is a domain name?).

How a receiving server checks an emailEmail arrivesclaims to befrom your domainSPF checksent from anapproved server?DKIM checksignaturevalid?DMARC checkdoes it match theFrom address?Apply policydeliver, quarantineor reject
Figure 1. DMARC ties SPF and DKIM to the address people actually see, and tells receivers what to do when checks fail.

SPF: who is allowed to send

Sender Policy Framework is a list of the mail servers allowed to send email for your domain. A receiving server checks whether the message came from one of them. A typical record looks like:

v=spf1 include:_spf.google.com -all

This says "Google's mail servers may send for us; reject anything else". SPF has limits: it checks a hidden technical address rather than the From address people see, and it can break when email is forwarded.

DKIM: a signature on every email

DomainKeys Identified Mail adds a digital signature to each outgoing message, created with a private key held by your email service. The matching public key is published in DNS. Receivers use it to confirm that the message really came from your domain and was not changed on the way. DKIM usually survives forwarding.

DMARC: the policy and the reports

DMARC (Domain-based Message Authentication, Reporting and Conformance) adds two things:

  • Alignment: SPF or DKIM must pass for the same domain as the visible From address. This is what stops look-alike tricks.
  • A policy telling receivers what to do when a message fails:
PolicyWhat happens to failing emailWhen to use it
p=noneDelivered as normal; you just get reportsWhile you find all your legitimate senders
p=quarantineUsually sent to spam or junkOnce you are fairly confident
p=rejectRefused outrightThe goal once everything legitimate passes

A record might look like v=DMARC1; p=quarantine; rua=mailto:dmarc@example.com. The rua address receives daily aggregate reports from providers such as Google and Microsoft.

Reading a DMARC report

Aggregate reports are XML files listing which servers sent email using your domain, how many messages, and whether SPF and DKIM passed and aligned. When everything passes from servers you recognise, such as your email provider, all is well. Failures from unknown servers usually mean someone is trying to spoof you, and your policy is doing its job. Failures from a service you do use (a newsletter tool, for example) mean you need to add it to SPF or set up DKIM for it.

Getting started

  1. Set up SPF and DKIM through your email provider's instructions.
  2. Publish DMARC with p=none and a reporting address.
  3. Review reports for a few weeks and fix any legitimate senders that fail.
  4. Move to p=quarantine, then p=reject.

Large mailbox providers now expect bulk senders to have SPF, DKIM and DMARC in place, so this also helps your genuine email reach inboxes.

Want to go deeper? Read How email reaches you, our note on email protocols and web, email and DNS security.

Key takeaways

  • SPF lists the servers allowed to send email for your domain.
  • DKIM signs each email so receivers can check it is genuine and unchanged.
  • DMARC requires alignment with the visible From address and sets a policy: none, quarantine or reject.
  • DMARC reports show who is sending as your domain; move gradually from p=none to p=reject.

Sources and further reading

Verified author✓ Valid
Issued to
Mohamed Fayas
Role
Founder of FM TecHub
Credentials
CCNABTEC HND Network EngineeringBEng (Hons) Computer Networking & Cloud Security
Issuer
FM TecHub · fmtechub.com

He writes practical, plain-English guides on networking, security and cloud.

More about the author →

© 2026 FM TecHub. Original content written for FM TecHub. Share the link freely; please don't copy the text elsewhere without permission.

Email updates: coming soon

New notes, tools and security news from FM TecHub by email, explained simply. Free. We're not collecting email addresses yet; see our privacy policy.

PortServiceStatus
SMTP/25Email updatesopening soon

Meanwhile, stay connected: