SPF, DKIM, DMARC: email authentication

How to stop anyone from sending email in your company's name. What each of the three records does, the order to roll them out in, and the most common mistakes.

Topic
IT security
Author
ARLITECH expert team
Published
Updated

The base email protocol has no authentication: anyone can type anything into the From field. Three DNS records (SPF, DKIM, DMARC) fill that gap, and together they stop outsiders from sending email in your company's name.

In many organizations, though, they are configured and still don't work.

What the three records do

SPF lists the servers allowed to send email on behalf of the domain. The receiving server checks whether the sending IP is on that list.

DKIM adds a cryptographic signature to the message. Using a public key fetched from DNS, the receiving server checks that the message was not altered in transit and really came from the domain.

DMARC ties the two together: it says what should happen when the checks fail and where to send reports about it. It is the most important of the three, because SPF and DKIM on their own only flag a problem; they don't block anything.

The most common mistake: DMARC left in monitoring mode

The p=none setting blocks nothing and only asks for reports. That is right for the first step of a rollout, but in many organizations it stays there for years because nobody dares to take the next step.

There are two levels of enforcement:

  • p=quarantine: failing mail goes to the junk folder
  • p=reject: the receiving server rejects failing mail

Until p=reject is in place, anyone can send email in your company's name, and it will be delivered.

The rollout order

1. Sender inventory. Which systems send email on behalf of the domain? Besides your own mail system there is usually a newsletter tool, an invoicing system, a CRM, an HR system, and a monitoring tool as well. Each one has to be added to SPF, or you will end up blocking your own mail.

2. Set up SPF. Watch the limit of ten DNS lookups: with too many include entries, the SPF record becomes invalid. Where many services send email, this happens often.

3. DKIM on every sender. Setting it up on the main mail system is not enough: every system that sends on behalf of the domain needs its own signing key.

4. DMARC at p=none, with reports. Within a few weeks you can see which senders fail, and which of those are legitimate.

5. Gradual tightening. p=quarantine at a partial percentage, then in full, and finally p=reject.

DMARC reports arrive as raw XML, which makes them unreadable as they are. Several free and paid services process them and show you in charts who is sending in your name. Without a tool like that, the reports sit in a mailbox and nobody looks at them.

Also worth setting up

BIMI. Shows your logo next to the message in the recipient's email client. It requires DMARC at enforcement, so it only comes into play after the steps above. It helps the brand and gives the recipient a signal of trust.

MTA-STS. Forces mail to travel over an encrypted connection. Without it, encryption is optional and can be downgraded.

External sender tagging. This is a rule you set in your own mail system rather than a DNS record: email arriving from outside gets a visible marker. It is one of the most effective controls against phishing that poses as instructions from an executive.

What it does not solve

Email authentication stops others from sending email in your domain's name. It does not stop:

  • email from a lookalike domain (arl1tech.hu),
  • technically flawless email from a compromised partner account,
  • deception through the display name.

Protection against these comes from training, processes, and technical filtering working together. We covered this in detail in our article on phishing.

Checking your setup

You can check the configuration in a few minutes: send a message to an external mailbox and look at the Authentication-Results line in the header. It shows whether SPF, DKIM, and DMARC passed.

If any of them shows fail or none, there is work to do there. Sorting out authentication for your mail domain is part of our email security service.

Contact

Ready to secure your critical systems?

Our experts will assess where your security stands and build a roadmap that fits your organization.

ARLITECH's office in Gödöllő

Visit us

You are welcome to visit our Gödöllő office in person.

Address
Centrum Office Building, 2100 Gödöllő, Dózsa György út 13, 3rd floor, office 309
Office hours
Mon–Fri, 9 a.m. to 5 p.m.
Get directions (opens in a new tab)