Email

SPF, DKIM and DMARC explained: stop your email going to spam

A practical guide to email authentication: what SPF, DKIM and DMARC do, example records, the Gmail and Yahoo sender rules and how to roll out DMARC safely.

By Oxflare Engineering2 min read

Updated

Business email inbox illustration

Email was designed without any way to prove who sent a message. Spammers and fraudsters exploit that by sending mail that claims to come from your domain. Three DNS-based standards fix this, and mailbox providers increasingly reject or junk mail that does not use them.

SPF: who may send

Sender Policy Framework is a TXT record listing the servers allowed to send email for your domain. A receiving server checks whether the sending IP is on the list.

v=spf1 include:_spf.oxflare.email include:sendgrid.net -all

Keep it to one SPF record per domain and stay under the limit of ten DNS lookups.

DKIM: was it altered?

DomainKeys Identified Mail adds a cryptographic signature to each message. The public key is published in DNS under a selector, such as ox1._domainkey.example.com. Receivers verify the signature, which proves the message came from an authorised system and was not modified in transit.

DMARC: what to do when checks fail

DMARC ties SPF and DKIM to the visible From address and tells receivers what to do with mail that fails: nothing (p=none), send to spam (p=quarantine) or reject it (p=reject). It also asks receivers to send you reports.

v=DMARC1; p=none; rua=mailto:dmarc@example.com; adkim=s; aspf=s

Why it matters more than ever

Since February 2024, Gmail and Yahoo require anyone sending more than 5,000 messages a day to their users to have SPF, DKIM and a DMARC policy, and all senders must at least have SPF or DKIM. Microsoft announced similar requirements for Outlook.com in 2025. Even small senders see better inbox placement with all three in place.

Rolling out DMARC safely

  1. List every service that sends mail as your domain: your mailbox provider, website forms, invoicing software, newsletters, CRM.
  2. Add each one to SPF and enable DKIM signing in each service.
  3. Publish DMARC with p=none and read the reports for two to four weeks.
  4. Fix any legitimate sources that fail.
  5. Move to p=quarantine, then p=reject.

Oxflare business email publishes SPF and DKIM for you and starts DMARC in monitoring mode. Our team can help read reports and tighten the policy.

Related questions

Not answered here? Our team replies within one working day.

Ask a question
Can I have two SPF records?

No. Multiple SPF records cause SPF to fail. Combine all senders into one record.

Put it into practice

Our team can set this up for you, or answer any questions.