← All notes

Fixing email authentication on a domain that had none

A domain with SPF but no DKIM and no DMARC sends mail that lands in spam. Here is the order I fixed it in, and the one test that actually proves it works.

I moved a personal domain from a free mailbox to a paid one this week. The site was fine. The email was not: it had an SPF record, no DKIM signature and no DMARC policy at all. That combination is the most common reason small business mail ends up in a spam folder while the sender insists they set it up correctly.

Why SPF alone is not enough

SPF says which servers are allowed to send for a domain. It authenticates the envelope, not the message. Forwarding breaks it, and plenty of receivers weigh it lightly on its own. DKIM signs the message so the receiving server can prove it was not altered in transit. DMARC ties both to the visible From header and tells receivers what to do when neither passes. Skip either half and you are relying on the recipient's generosity.

The order that works

  1. Publish the DKIM record first, at the selector the provider gives you. Mine was spacemail._domainkey. It is a long TXT value, and a truncated paste is the most common mistake.
  2. Replace the SPF record rather than adding to it. Two SPF records on one domain is an automatic failure, so if you find two, merge them into one include chain.
  3. Add DMARC starting at p=none with a reporting address. Do not jump to reject on day one, because you will reject your own legitimate mail.
  4. Add the autodiscover SRV record if the provider publishes one. It saves users from typing server names.

Prove it, do not assume it

Sending a test to yourself proves nothing, because your own inbox is the most forgiving observer on the internet. I sent a test to a public authentication verifier instead, which replies with a written report. The useful lines are SPF, DKIM and DMARC, and DKIM has to match the domain in your From header, not just pass in isolation.

If all three pass there and mail still lands in spam, the problem is no longer configuration. It is reputation, and reputation is built by sending a small volume of mail that people actually want, slowly, for a few weeks.

What I would check on any client domain

  • Exactly one SPF record, under the 10 lookup limit
  • A DKIM selector that matches what the provider publishes today
  • A DMARC record with a reporting address someone reads
  • Reverse DNS on the sending IP matching the hostname
  • No sending from a server with no sending history

None of this is hard. It is just the kind of work that nobody notices until a quote goes to a client's spam folder and the deal quietly dies.

Written by Ali Abbas Kazmi, a web developer in Islamabad. alikazmidev@proton.me