SPF, DKIM and DMARC: how to stop others impersonating your company by email
Three DNS records decide whether someone can send email on behalf of your company. How to configure them through to rejection, without losing legitimate messages.
Over 10 workstations · support agreement · remote, on-site and phone support
In short
For busy decision-makers.
01By default, email does not verify who the sender is.
02SPF says who can send; DKIM signs; DMARC decides what to do.
03The goal is p=reject, reached in stages and backed by reports.
04Look-alike domains and compromised accounts require other defences.
In this article
An email that appears to come from your domain, with your logo and your finance director's signature, reaches a customer asking for an IBAN change. Nobody broke into your systems. The attacker simply sent a message on behalf of your company's domain, and nothing stopped them.
Three DNS records on your domain — SPF, DKIM and DMARC — exist precisely for this. Correctly configured, they tell the rest of the world who may send email on behalf of your company and what to do with anything that fails the test. They are invisible day to day and decisive on the day someone tries to impersonate you.
The problem: email does not verify the sender by default
The email protocol was created at a time when everyone knew each other. By default, any server can write any address in the "From" field. That is why altered-invoice fraud still works: the recipient sees a familiar sender and trusts it.
SPF, DKIM and DMARC add that verification. They do not replace people's vigilance, but they take the easiest tool away from the attacker.
SPF: who can send on behalf of the domain
SPF is a list published in the DNS of the servers authorised to send email for the domain: Microsoft 365 or Google Workspace, the newsletter platform, the invoicing software, the CRM. When a message arrives, the receiving server checks whether it came from one of those addresses.
The most common mistakes:
Forgetting services that also send email — invoicing, the website, the helpdesk — which then start failing the check.
Having more than one SPF record, which invalidates all of them.
Exceeding the limit of 10 DNS lookups, a typical problem for companies with many services.
Ending the record with "+all", which authorises any server in the world.
DKIM: the signature that proves the message has not been altered
DKIM adds a digital signature to every email. The receiving server uses a public key published in the DNS to confirm that the message genuinely came from one of the company's systems and was not altered along the way.
In Microsoft 365, DKIM must be enabled domain by domain — it is not switched on automatically for custom domains. Every external service that sends on behalf of the company should have its own DKIM signature configured.
DMARC: the rule that gives SPF and DKIM real consequences
Without DMARC, a message that fails SPF and DKIM may be delivered anyway. DMARC tells receiving servers what to do in that case and asks them to send reports on what they have received on behalf of the domain.
It has three levels:
p=none — only monitors and sends reports. This is the starting point.
p=quarantine — messages that fail go to spam.
p=reject — messages that fail are refused. This is the goal.
Many companies stay on p=none forever. They have the record, but no protection: the reports arrive and nobody reads them.
How to go from "none" to "reject" without losing legitimate email
The order matters. Jumping straight to p=reject without an inventory blocks legitimate invoices, newsletters and notifications.
Inventory — list every service that sends email using the company's domain.
SPF and DKIM on all of them — fix the SPF and enable DKIM in Microsoft 365 and in each external service.
DMARC in monitoring mode — publish p=none with an address to receive reports and analyse them for a few weeks.
Gradual quarantine — move up to p=quarantine, first for a percentage of messages.
Rejection — once the reports show only legitimate traffic passing, move to p=reject.
Maintenance — every new service that sends email must be added before it goes into production.
Do not forget domains that do not send email — old domains, brand domains or campaign domains. They can also be used for fraud and should have SPF and DMARC set to reject everything.
Why it is no longer optional
Google and Yahoo now require SPF, DKIM and DMARC from anyone sending large volumes of email to their users, and Microsoft has followed the same path on Outlook.com. Even for low-volume senders, a domain without authentication is more likely to see its messages — proposals, invoices, replies to customers — end up in spam.
And there is the reputational side: if someone uses your domain in a fraud, the customer who was defrauded will remember your company's name, not the attacker's.
What DMARC does not solve
DMARC protects the company's exact domain. It does not stop look-alike domains, whether with a swapped letter or a different ending, nor legitimate email accounts that have been compromised. For that, you still need multi-factor authentication, email filtering, staff training and one simple procedure: any change of bank details is confirmed by phone, on a number you already know.
How DataRoad handles its clients' email
In the contracts for IT support provided by DataRoad, domain authentication is part of the core email set-up: an inventory of the services that send on the company's behalf, SPF corrected, DKIM active in Microsoft 365 and in external services, and DMARC taken through to rejection, with reports monitored by the technical team. In 11 years in business, zero security incidents.
* Call to the Portuguese national landline network.
Frequently asked questions
Do SPF, DKIM and DMARC cost anything?
They are DNS records for the domain, with no licence cost. The work lies in inventorying the services that send email, configuring each one and monitoring the reports until you reach rejection.
How long does it take to reach p=reject?
It depends on the number of services that send email using your domain. For a typical SME, a few weeks of monitoring the reports is enough to move forward safely.
Can configuring DMARC cause emails to be lost?
It can, if you jump straight to rejection without an inventory. By starting in monitoring mode and stepping up based on the reports, legitimate email continues to be delivered.
We have Microsoft 365. Does this come already configured?
Not entirely. Microsoft 365 takes care of the onmicrosoft.com domain, but on your own domains the SPF must be reviewed, DKIM must be enabled, and DMARC must be published and monitored.
Does DMARC stop all fraudulent emails?
No. It stops attackers from using your company's exact domain. Look-alike domains and compromised accounts require other defences, such as MFA, filtering and phone confirmation of bank detail changes.
Premium MSP · Portugal, Europe and the USA
A Portuguese MSP with an international standard.
DataRoad runs structured cabling, enterprise wireless networks, helpdesk and IT support for companies in Portugal, Europe and the USA, with remote support, a datacenter with redundant internet and on-site assistance across the country.