SPF, DKIM and DMARC are three entries in a domain’s DNS settings that enable the recipient’s server to verify whether an email with your domain in the sender’s address really comes from you. SPF specifies the authorised sending servers, DKIM signs each message, and DMARC links both checks to the address visible in the ‘From’ field and specifies what to do with emails that fail these checks.
You usually come across these shortcuts at one of two points. Either the mailing tool asks you to paste a few records into the domain provider’s system, or the newsletter starts ending up in spam and someone advises you to ‘check the authentication’. Below, each record is explained individually: exactly what it verifies, what it does not verify, and what happens if it is missing.
Why does email need authentication?
The protocol used to send email for decades does not verify the sender. In the ‘From’ field, you can enter any address you like, just as you can write any return address on an envelope. Impersonating another domain is therefore technically straightforward and is frequently exploited in scams.
SPF, DKIM and DMARC were introduced later to patch this vulnerability. All three work on the same principle: the domain owner publishes information at DNS, and the recipient’s server compares the incoming message against it. Only the domain owner has access to DNS, so the record can be trusted.
The results of these tests are one of the factors that determine email deliverability. Not the only one, but one without which other efforts are of little use.
SPF: who can send emails on behalf of a domain
SPF (Sender Policy Framework) is a TXT record containing a list of servers authorised to send email on behalf of a given domain. It looks something like this:
v=spf1 include:_spf.example.net -all
This reads as follows: emails may be sent from servers specified by example.net, and all others must be rejected. If you send emails from several sources (company email, online shop, newsletter tool), each of them must be included in this single record.
This confirms that the message came from a server that the domain owner has authorised to send messages.
What it does not confirm is that the address shown in the ‘From’ field is genuine. SPF checks the reply-to address - that is, the technical address to which bounce messages are returned and which the recipient cannot see. Nor does it say anything about whether the content arrived unchanged.
If it is missing: the recipient’s server does not know whether the source is authorised, and treats the message with greater suspicion. Nor is there anything to prevent any server from sending email with a return address in your domain.
Two common errors in an existing record produce a similar result. The first is having two SPF records in a single domain instead of just one. The second is a list that is too long: SPF allows a maximum of 10 references to other domains, and if this number is exceeded, the test fails.
SPF has one more weakness. When someone forwards your message - for example, from a business address to a private one - it is sent by a different server that isn’t on your list. The test then fails, even though nothing untoward has actually happened.
DKIM: a signature under every message
DKIM (DomainKeys Identified Mail) adds a digital signature to the header of every message. The sender’s server generates it using a private key that it does not disclose to anyone. The corresponding public key is stored in the domain’s DNS and anyone can download it.
The recipient’s server retrieves the public key and checks whether the signature matches. If so, it knows two things: the message was signed by the specified domain, and the signed parts (the body and the most important headers, including the subject and the ‘From’ field) have not been altered in transit.
This confirms that a specific domain takes responsibility for the message and that nobody has altered it along the way.
This does not confirm that the domain in the signature is the same as the one the recipient sees in the ‘From’ field. The message may have a valid signature from a completely different domain.
When it’s missing: the filter has nothing to associate its reputation with. Reputation is largely built up around the domain in the signature, so it is harder for an email address without DKIM to earn trust. You also lose the security measure that comes into play when the message is forwarded: the signature travels along with the message, so unlike SPF, it usually survives the journey.
DMARC: compliance with the ‘From’ field and policy for the recipient server
SPF and DKIM share a common vulnerability: neither checks the address that the recipient sees. DMARC resolves this. It requires that the domain in the ‘From’ field matches either the domain that passed SPF validation or the domain in the DKIM signature. Either one is sufficient.
The second part of DMARC is the policy, which is a set of instructions for the recipient’s server on what to do with a message
that does not meet this condition. The entire DMARC consists of a single TXT record added under the name
_dmarc.example.com:
v=DMARC1; p=none; rua=mailto:raporty@example.com
The parameter p can take three values:
none: don’t do anything with the message, just send the reports,quarantine: please mark any messages that fail the test as spam,reject: reject them in their entirety.
The address in rua is a mailbox to which email providers send summary reports: which
servers the email from your domain came from and how the tests went.
This confirms that the address visible to the recipient belongs to the domain that has actually authenticated the message.
What it does not confirm is that the sender is legitimate. DMARC also does not protect against a domain that is strikingly similar to yours, as the person who registered it may publish their own, valid records for it.
When it’s missing: each server decides for itself what to do with spam emails using your domain, and you won’t realise that someone is impersonating you. There’s also a more practical consequence. From 2024, the largest email providers will require a DMARC record from bulk senders, so without it, a newsletter sent to a larger mailing list may be restricted or rejected.
How SPF, DKIM and DMARC work together
You are sending a newsletter from the address kontakt@example.com. The recipient’s server, in turn:
- Checks the SPF: whether the server that delivered the message is on the domain list associated with the reply-to address.
- DKIM checks whether the signature matches the public key at DNS.
- Checks DMARC: whether the domain that passed at least one of these tests is the same domain as the one shown in the ‘From’ field.
- If not, it applies the policy specified in the DMARC record.
No single measure is sufficient on its own. SPF without DKIM fails when messages are relayed. DKIM without DMARC does not protect the address visible to the recipient. DMARC without the other two has nothing to check, so no messages pass through it.
In what order should this be set?
- Check which domain you are sending from. This list applies to sending from your own domain, as you only have access to its DNS (you cannot add any of these entries in a free email service). If you are using a domain provided by an email sending tool, authentication - along with DMARC - is handled by that tool, and the following steps do not apply to you.
- Make a list of everything that sends emails on behalf of the domain: company email accounts, the online shop, the invoicing system, and the newsletter.
- Add an SPF and DKIM record for each of these sources. The records are provided by the relevant service provider.
- Add DMARC with the ‘
p=none’ policy and a reporting address. - Read the reports over the course of a few weeks. They’ll reveal sources that nobody had remembered.
- Only then should you tighten policy to
quarantine, and finally toreject.
Order matters. A policy reject enabled on the first day can block legitimate
emails, such as invoices from a system that nobody has added to the SPF.
It is worth using a subdomain for your newsletter, such as newsletter.example.com. This ensures that the campaign’s reputation
is not mixed up with that of regular business correspondence. Changes to DNS are usually visible
within a few minutes, although it can sometimes take up to 72 hours.
What authentication cannot achieve
Correct SPF, DKIM and DMARC records simply tell the filter that you are who you claim to be. They do not say that anyone actually wants your messages. A spammer can also have their records set up perfectly.
Whether an email ends up in the inbox is still determined by how recipients react: whether they open it, click on links, or mark it as spam. That is why authentication goes hand in hand with a list collected ethically, ideally via double opt-in, which filters out typos and other people’s addresses before they are included in the mailing list.
The remaining factors, including the bounce and spam report thresholds that are worth monitoring, are summarised in the ‘Deliverability Basics’ section of the documentation.
What is it like at theblue.email?
By default, campaigns are sent via the platform’s shared infrastructure, from a domain authenticated and signed on your behalf. The recipient sees your sender name and address in the platform’s domain in the ‘From’ field, whilst your own address (including one from a free email service) is set as the reply-to address, so replies are sent to you. You don’t need to configure anything in DNS, and emails are never sent out unsigned.
If you want your messages to be signed by your domain, and for the reputation to depend solely on your own mailings, you can connect your own sending domain. The platform generates ready-to-use records to paste into your domain provider’s system and checks whether they are already visible. The next steps are described in the guide to custom sender domains.
The DMARC record for your own domain remains under your control, as the policy applies to the entire domain, not just a single tool. A new domain also has no sending history, so set it up before a major campaign, rather than during it. The price list shows which plans include a custom domain.
If you’d prefer to see how the mailing service works without making any changes to DNS, create an account and send your first campaign from the platform’s domain. You can return to your records once your mailing list has grown.