Imagine your customers receive an invoice in the post. Your company name and address appear as the sender on the envelope. But the letter is not from you at all: it is from a fraudster. With a traditional letter, anyone can put someone else’s return address on the envelope.
Email works in a similar way: the visible sender address can be forged without anyone needing access to your email account. This technique is known as email spoofing. Fraudsters use it, for example, to send fake invoices or payment requests that appear to come from a familiar company.
Three important security mechanisms help make this kind of deception more difficult: SPF, DKIM and DMARC. They help receiving mail servers check how an email was sent and where it came from.
In this article, you will learn how these three mechanisms work, what they have in common with a letter and when you need to take action yourself.
What Is Email Authentication?
The receiving mail server uses technical information to check whether an email was sent through an authorised server and whether the verified details match the visible sender.
Three mechanisms work together:
- SPF checks whether the sending mail server is authorised to send email for the domain being used.
- DKIM checks an email’s digital signature.
- DMARC checks whether the domain authenticated by SPF or DKIM matches the visible sender and sets policies for messages that fail authentication.
The domain is the part of your email address after the @ symbol. For example, in contact@your-example-domain.com, the domain is your-example-domain.com.
SPF: Is This Mail Server Authorised to Send the Email?
Imagine your company sends business letters only through certain post offices. A recipient could then check whether a letter claiming to be from you was actually sent through one of those authorised offices.
This is exactly what SPF (Sender Policy Framework) does for email. SPF lets you specify which mail servers are authorised to send email for a particular domain. These permissions are stored in what is known as an SPF record, which is held in your domain’s DNS settings. The DNS (Domain Name System) provides technical information about domain names.
How Does SPF Work?
When you send an email, it is sent through a mail server. The receiving mail server looks up which sending servers are allowed by the SPF record and checks whether the actual sending server is one of them. If the server is authorised, the email can pass the SPF check.
Why Is SPF Alone Not Enough?
A letter’s envelope can carry different types of information, such as the visible sender address and details about how the letter was sent.
Emails also have two different sender addresses: the visible email address that the recipient sees in the “From” field and a technical sender address used during transmission.
SPF normally checks the domain of the technical sender address. This means an email can pass the SPF check even if a different domain appears in the visible sender field.
This is why DMARC is also important. It checks whether the authenticated domain matches the visible sender.
What Should You Bear in Mind When Setting Up SPF?
There must be only one SPF record for any given domain name.
If you use other services alongside your regular email account, such as a newsletter service, invoicing software or an online shop, you may need to include their sending infrastructure. Providers will normally tell you which settings are required. Where necessary, add these details to your existing SPF record rather than creating a second one.
You also need to consider SPF’s technical limits. Among other restrictions, an SPF check must not require more than ten DNS lookups of certain types.
For ALL-INKL.COM customers: Our SPF record guide explains how to update your SPF record.
DKIM: Your Email’s Digital Seal
Important letters are sometimes sealed to make it possible to detect whether they have been opened or altered since the seal was applied.
DKIM (DomainKeys Identified Mail) performs a similar role for email. It adds a digital signature to an email. The receiving mail server can use this signature to check whether certain parts of the message have changed since it was signed.
How Does DKIM Work?
The digital signature uses a pair of keys: the sending mail server signs the email with the private key, which is kept secret. The receiving mail server can check the signature using the public key. The public key is made available through the domain’s DNS settings.
When the email is sent, the responsible mail server adds a digital signature to the message. The receiving mail server then retrieves the public key and checks the signature.
If the check succeeds, it confirms that the verified parts of the message have not changed since signing and that the signature belongs to the specified domain.
Do I Need to Set Up DKIM Myself?
If you send your emails through ALL-INKL.COM’s mail servers, DKIM is already set up. If you use a third-party email sending service, additional configuration may be necessary. The provider will normally supply the required DNS details.
Important: the sending service must actually sign the emails. A DNS record alone is not enough.
You can find further information in our guide to DKIM for external mail servers.
DMARC: Does the Authenticated Sender Match the Address on the Envelope?
Imagine you receive a business letter. The name of a familiar company appears on the envelope. The letter was sent through an authorised post office and has a valid seal. However, both of these relate to a completely different company. The sending details may therefore be correct, but they do not match the claimed sender.
This is where DMARC (Domain-based Message Authentication, Reporting and Conformance) comes in. DMARC checks whether the domain authenticated by SPF or DKIM matches the domain in the visible sender address. This comparison is also known as alignment.
A Practical Example
Suppose you send invoices using third-party invoicing software.
Your customers see this sender address:
invoices@your-example-domain.com
However, the invoicing software sends the email through its provider’s own mail servers. The SPF check may succeed because the provider has configured its sending servers correctly. However, SPF initially authenticates the provider’s domain, which is not necessarily your company’s domain. Passing SPF alone is therefore not enough to pass the DMARC check in this case.
If the invoicing service also adds a valid DKIM signature for your-example-domain.com, the message can still pass the DMARC check.
The comparison with a letter: DMARC checks whether the verified sending or seal details match the company named as the sender on the envelope.
Do Both SPF and DKIM Need to Pass?
No. To pass the DMARC check, at least one of the two mechanisms must succeed, and the domain it authenticates must match the visible sender.
Even so, it makes sense to configure both SPF and DKIM correctly so that they complement each other.
What Does DMARC Alignment Mean?
Alignment checks whether the authenticated domain matches the visible sender domain. There are two types: with relaxed alignment, related parent domains and subdomains can match, such as your-example-domain.com and mail.your-example-domain.com. With strict alignment, the domain names must match exactly.
SPF, DKIM and DMARC at a Glance
Our letter analogy provides a useful summary of the three mechanisms:
| Mechanism | Comparison with a letter | Role in email authentication |
|---|---|---|
| SPF | Authorised post office | Checks whether the sending server is authorised. |
| DKIM | Verifiable seal on a letter | Checks the digital signature and the signed parts of the message. |
| DMARC | Comparison with the sender on the envelope | Checks whether the authenticated domain matches the visible sender and specifies policies for messages that fail authentication. |
Setting Up DMARC: What Happens If a Check Fails?
DMARC does more than establish whether the authenticated domain matches the visible sender. As a domain owner, you can also specify how receiving mail servers should handle emails that fail this check.
There are three possible policies:
| Setting | Meaning |
|---|---|
p=none |
The email should neither be rejected nor quarantined on the basis of the DMARC policy. |
p=quarantine |
The email should be treated as suspicious, for example by moving it to the spam folder. |
p=reject |
The email should be rejected. |
The final decision rests with the receiving mail server.
Which Setting Should You Start With?
When setting up DMARC for the first time, it is advisable to start with p=none. This lets you check whether your emails are being authenticated correctly without immediately requesting rejection on the basis of the DMARC policy.
This is particularly important if you use several sending services. If your newsletter service or invoicing software is not configured correctly, for example, a stricter policy could cause legitimate emails to be rejected too.
You can also enable DMARC reports. These reports are generated by receiving mail servers and provide information about which servers send emails using your domain and whether the authentication checks succeeded. To receive them, you need to specify a reporting address in the DMARC record using the rua parameter.
Please note: ALL-INKL.COM does not send DMARC reports itself. However, if you specify a reporting address, you can receive reports from other email providers, provided they support sending DMARC reports.
You should only consider a stricter policy once all authorised sending services are working correctly.
SPF, DKIM and DMARC at ALL-INKL.COM: What Is Already Set Up?
If you send your emails through ALL-INKL.COM’s mail servers, important basic settings are already in place.
SPF and DKIM are configured for email sent through these servers. A DMARC record with p=none is also in place by default.
In many cases, you therefore do not need to make any additional settings initially. However, it is worth checking your configuration if you have made changes to your domain, use external name servers or use other services to send email.
When Do You Need to Take Action Yourself?
Examples include newsletter services that send your emails, invoicing software that sends invoices automatically, online shops that send order confirmations, contact forms on your website and third-party email providers that you use with your own domain.
These services are not automatically covered by ALL-INKL.COM’s default settings.
Three Steps to the Right Configuration
1. Review Your Sending Services
Start by listing all the services that send emails using your domain. Think beyond your regular email accounts to include invoicing software, newsletters, contact forms and automated notifications.
2. Test Email Delivery
Send a test email through each service you use. First, check whether the message reaches the recipient. Then check whether it passed SPF, DKIM and DMARC authentication. You can find this information in the message’s technical headers (email headers), for example, or by using suitable testing tools.
If you encounter problems, check the relevant sending service’s instructions or contact its support team.
For contact forms, you should also make sure that an address on your own domain is used as the sender.
3. Adjust DMARC If Necessary
Once all authorised sending services reliably pass the checks, you can set a stricter DMARC policy. DMARC reports can help you identify potential errors. However, these reports do not necessarily cover every email sent.
You can find your DNS settings in KAS under “Tools” and “DNS Settings”. Our DMARC configuration guide explains the individual steps.
What SPF, DKIM and DMARC Cannot Do
A letter may have been sent through an authorised post office and carry a valid seal, yet its contents may still be fraudulent. The same applies to email.
SPF, DKIM and DMARC help verify an email’s technical origin. However, they do not guarantee that a message’s contents are safe or trustworthy. DKIM does not encrypt the contents of your emails.
For example, fraudsters can correctly authenticate their own domains or send messages through a hacked email account. These mechanisms also cannot fully prevent forged display names or domains that look deceptively similar to your own.
SPF, DKIM and DMARC do not guarantee that an email will reach the inbox either. Email providers consider other factors, such as the sender’s reputation and the message’s contents. Forwarding and mailing lists can also affect authentication.
You should therefore remain cautious about unusual payment requests, unexpected attachments and messages asking for login details. Our article How to spot phishing emails: Common signs and examples explains how to recognise phishing emails.
If in doubt, contact the supposed sender using contact details you already know.
FAQ: Frequently Asked Questions about SPF, DKIM and DMARC
Do I Need to Set Up SPF, DKIM and DMARC Myself?
If you send your emails through ALL-INKL.COM’s mail servers, SPF and DKIM are already configured. A DMARC record with p=none is also in place by default. If you use additional sending services, you should check their settings.
Do I Need All Three Mechanisms?
Yes, combining them makes sense because they perform different roles. Although a valid, aligned SPF or DKIM result is enough to pass a DMARC check, the two mechanisms can complement each other when both are configured.
Can I Use Multiple SPF Records?
There must be only one SPF record for any given domain name. If you use several sending services, their requirements must be included in that record. Subdomains may need their own SPF records.
Can I Use Multiple DKIM Keys?
Yes. A domain can have multiple DKIM keys, for example for different sending services. Selectors help the receiving mail server find the correct public key.
Does DMARC with p=none Already Protect against Spoofed Emails?
With p=none, you are not requesting rejection or quarantine when a DMARC check fails. This setting is therefore mainly useful for monitoring and checking your configuration. Receiving mail servers can apply their own security measures independently.
Why Am I Not Receiving DMARC Reports?
Not all email providers send DMARC reports. ALL-INKL.COM itself neither provides nor sends DMARC reports.
To receive reports, you need to specify a valid reporting address in the DMARC record using the rua parameter. If the reporting address is on a different domain, additional DNS authorisation may be required.
Also bear in mind that reports are generated by receiving mail servers. Whether and when you receive a report therefore depends on the email provider concerned.
What Should I Consider When Adding a New Newsletter Service or Invoicing Tool?
First, check which SPF and DKIM settings the provider requires. Also make sure that the domains used align with the visible sender address so that the email can pass the DMARC check.
Test the service’s email sending before putting it into regular use. Remove any sending permissions that are no longer needed.
Three Mechanisms to Help Protect Your Email Domain
The comparison with a letter shows why SPF, DKIM and DMARC matter. With a traditional letter, the sender address on the envelope is easy to forge. Similarly, an email’s visible sender address alone is not reliable proof of its origin.
This is where the three mechanisms help: SPF checks whether the sending server is authorised, DKIM checks the digital signature and DMARC checks whether the authenticated domain matches the visible sender. Together, they make it harder for fraudsters to send emails in your domain’s name.
If you send your emails through ALL-INKL.COM’s mail servers, the most important basic settings are already in place. If you use additional sending services, you should check their configuration and make sure your emails pass the authentication checks. This helps protect your email domain against misuse while preventing legitimate messages from being rejected because of incorrect settings.