The short version. When you send an invoice, the receiving mail system asks three questions: is this server allowed to send for your domain (SPF), was the message signed by your domain and left unchanged (DKIM), and what does your domain want done with mail that fails (DMARC). If the answers are missing or muddled, your mail is more likely to land in spam or be turned away, and it is easier for someone else to send mail pretending to be you. All three are records in your domain’s DNS settings. Setting them up is a few hours of careful work, not a project.
Why this matters more than it used to
Google, Yahoo and Microsoft’s Outlook.com have all tightened their rules since 2024. Google, for example, has required since February 2024 that every sender to Gmail accounts has SPF or DKIM, and that anyone sending more than 5,000 messages a day to Gmail accounts has all three (Google’s sender guidelines). A small office rarely sends that much, but the large mailbox providers look at authentication for everyone, and mail without it is the first to be filtered. Some cyber insurance questionnaires ask about DMARC too.
What each record does
SPF (Sender Policy Framework) is a list of the servers allowed to send email for your domain. It is one line of text in your DNS. When a message arrives claiming to be from you, the receiving server checks whether it came from a server on your list. For an office that sends only through Microsoft 365, it looks like this:
yourfirm.com TXT v=spf1 include:spf.protection.outlook.com -all
DKIM (DomainKeys Identified Mail) is a digital signature. Your mail service signs each message it sends, and publishes the matching public key in your DNS. The receiver checks the signature: if it is valid, the message really came through your service and was not altered on the way. In Microsoft 365, DKIM for your own domain means two DNS records named selector1._domainkey and selector2._domainkey, whose exact values you copy from the Microsoft Defender portal, and then switching signing on.
DMARC (Domain-based Message Authentication, Reporting and Conformance) ties the two together. It tells receivers what to do when a message claiming to be from your domain fails both checks for your domain, and where to send reports about what they see. It lives at a special name, _dmarc, in your DNS:
_dmarc.yourfirm.com TXT v=DMARC1; p=none; rua=mailto:[email protected]
The p= part is the policy. There are three settings:
| Policy | What receivers do with mail that fails | When to use it |
|---|---|---|
p=none |
Deliver it as usual, and send you reports | The first few weeks, while you find every sender |
p=quarantine |
Put it in spam | Once the reports show your real mail passing |
p=reject |
Refuse it | The goal, once you are confident |
One detail that trips people up: for DMARC to pass, SPF or DKIM must pass for your own domain, the one in the From line. A message signed by your mail provider’s domain instead of yours may pass DKIM but still fail DMARC.
How to check your own domain
You do not need to be technical to look.
- Send yourself a test. Send an email from your work address to a personal Gmail account. Open it, click the three dots, then Show original. Gmail lists SPF, DKIM and DMARC with PASS or FAIL next to each.
- Use a free lookup. Sites such as MXToolbox or Google’s Admin Toolbox let you type in your domain and see the records it publishes.
- Look at your DNS. Your records live wherever your domain’s DNS is hosted: often the company you bought the domain from, sometimes your web host. Look for TXT records starting
v=spf1andv=DMARC1.
The usual mistakes
These are the ones we find most often when we look at a new office’s domain.
Two SPF records. Someone adds a second v=spf1 line for a new service instead of adding the service to the existing one. The rules for SPF (RFC 7208) allow only one: with two, the check returns an error instead of a pass, for every message. Merge them into a single record.
Too many lookups in SPF. Each include: in an SPF record can lead to more lookups, and the standard sets a limit of ten. A record that lists every service you have ever tried can quietly go over, and then it errors instead of passing. Remove services you no longer use.
DKIM never switched on. Microsoft 365 signs mail with its own default domain (the one ending in onmicrosoft.com) until DKIM is set up for yours. That passes DKIM but not in a way DMARC accepts for your domain. The records are often half-done: published but never enabled, or enabled for the main domain and not for a second one.
DMARC stuck at “none” forever. p=none is the right place to start. It is the wrong place to stay. At “none”, receivers are not asked to stop mail that pretends to be from you, so much of it still gets through. Nobody read the reports, so nobody moved on.
Forgotten senders. Your website’s contact form, your accounting software sending invoices, a newsletter service, the copier’s scan-to-email. Each one sends “as” your domain and needs to be in SPF, signed with DKIM, or both, or its mail will fail once DMARC is enforced.
Records typed in the wrong place. Many DNS hosts add your domain to whatever you type in the name field. Type _dmarc.yourfirm.com there and you can end up with _dmarc.yourfirm.com.yourfirm.com. Usually you type only _dmarc.
A safe order to fix it
Done in this order, the risk of stopping real mail along the way stays low.
- List everything that sends email as your domain: your mail service, website forms, accounting and invoicing software, newsletters, scanners, alarm panels, anything else
- Publish one SPF record that includes all of them, ending in
~allwhile you are still finding senders - Turn on DKIM for your mail service and for every other sender that supports it
- Publish DMARC at
p=nonewith a reporting address, and read the reports for two to four weeks - Fix every legitimate sender the reports show failing
- Move DMARC to
p=quarantine, then top=rejectwhen the reports stay clean - Tighten SPF from
~allto-allonce every sender is listed - Check again whenever you add a new service that sends email for you
Make one change at a time. DNS changes can take time to reach everyone, and a mistake in the wrong record can stop mail for a whole office. Write down what each record said before you change it, so you can put it back.
Where we fit
Setting up SPF, DKIM and DMARC is a standard step when we start with a new office, and part of email protection on our Fully Managed plan. If you would like us to look at your domain, we can tell you what we find. Our Microsoft 365 and cybersecurity pages cover the rest of email security, and if your mail has already been misused, start with what to do when business email is hacked.