If customers keep telling you to “check your spam folder”, the problem is rarely what you wrote. Usually it is three DNS records that are missing, wrong or out of date. Since February 2024, Gmail and Yahoo have required anyone sending 5,000 or more messages a day to their users to have SPF, DKIM and DMARC in place, and smaller senders without them are treated with more suspicion too.
You can check your own domain in a few seconds with the free email tools on Sysadmin.lk.
SPF: who is allowed to send as you
SPF is a single TXT record on your domain that lists the servers allowed to send email for it. For a business on Google Workspace that also sends from its website host, it might look like this:
v=spf1 include:_spf.google.com include:mail.yourhost.lk ~all
Common mistakes:
- Two SPF records. A domain must have exactly one. Two records make both invalid.
- Too many lookups. SPF allows at most 10 DNS lookups. Each
include:counts, and so do the includes inside them. Go over and SPF fails. - Forgotten senders. Your newsletter tool, invoicing system and website contact form all send as your domain. Each needs to be covered.
DKIM: a signature on every message
DKIM adds a digital signature to each email. The receiving server checks it against a public key you publish in DNS. If the message was changed on the way, or did not come from a server holding your key, the check fails.
Each service that sends for you needs its own DKIM key. Google Workspace and Microsoft 365 both generate one for you in their admin panels; you add the record they give you to DNS and switch signing on. Most newsletter and invoicing tools do the same.
DMARC: what to do when the checks fail
DMARC ties SPF and DKIM to the address people actually see in the From line, and tells receiving servers what to do with mail that fails. It also asks them to send you reports.
Start by watching, not blocking:
v=DMARC1; p=none; rua=mailto:[email protected]
The reports show every server sending as your domain. Some will be services you forgot about; some may be people impersonating you. Once every legitimate sender passes, tighten the policy to p=quarantine, then p=reject. At that point a fake invoice “from” your domain gets blocked instead of delivered.
A safe order of work
- List every service that sends email as your domain.
- Fix SPF so there is one record that covers them all within 10 lookups.
- Turn on DKIM signing for each service.
- Publish DMARC with
p=noneand read the reports for a few weeks. - Fix anything that fails, then move to
quarantineand laterreject.
When it is not the records
If all three pass and mail still lands in spam, check whether your server’s IP address is on a blacklist, whether the reverse DNS name matches, and whether one infected PC or website on your network is sending spam. Reputation takes time to recover, which is one more reason to set the records up before there is a problem.