Skip to content
Book a call

SPF, DKIM and DMARC on the domain you send invoices from

· 4-minute read · Measurement and growth · by Direct Softworks

An invoice reminder in spam is a payment that arrives late. Three DNS records decide where it lands, and the one that matters is about alignment, not about passing.

Transactional email is not marketing. It goes to one person who is expecting it, it carries an amount and a link, and if it lands in spam the cost is concrete: a payment that arrives a fortnight late, or a contract that sits unsigned because nobody saw it.

Our panel sends exactly this kind of mail: reminders about unpaid invoices, links to contracts waiting for a signature. All of it goes out through Google's SMTP service, as our own domain, and the domain publishes three DNS records that let a receiving server decide whether to believe that.

Most explanations treat SPF, DKIM and DMARC as three boxes to tick. What decides whether your mail arrives is the relationship between them.

What each record checks

SPF checks the envelope, not the letterhead. It lists the servers allowed to send for a domain, and the receiver checks the connecting server against the domain in the SMTP MAIL FROM command, the return path. Not the From: line a person reads. Ours is one include for Google's servers and a soft fail for everything else:

v=spf1 include:_spf.google.com ~all

DKIM signs the message. The sending server adds a signature over the headers and body, naming a domain in its d= tag and a selector. The receiver fetches the public key from DNS under that selector (ours is published under google) and verifies the signature. A valid one proves that the named domain signed this exact message.

DMARC ties both to the address the reader sees. It is published under _dmarc on the domain and says, in effect: a message claiming to be from us must pass SPF or DKIM for a domain that matches the From: line, and here is what to do with one that does not. The parts of ours that matter:

v=DMARC1; p=reject; adkim=r; aspf=r

Alignment is the whole game

SPF and DKIM can both pass while DMARC fails, because each of them authenticates some domain, and nothing in either says it has to be yours.

Say your invoicing goes out through a mail service that uses its own domain as the return path and signs with its own domain. SPF passes, for the provider. DKIM passes, for the provider. The reader sees your company in From:. DMARC asks whether either authenticated domain aligns with that From: domain, finds that neither does, and fails the message. Under p=reject, the receiver is being asked to refuse it.

The DMARC specification, since May 2026 RFC 9989, which replaced RFC 7489, defines two alignment modes. Strict means the two domains are identical. Relaxed means they share an organisational domain, so a return path on mail.example.ro aligns with a From: on example.ro. A message passes if at least one authenticated identifier aligns. We publish relaxed for both, which is the sensible default for transactional mail: a sending service can use a subdomain of yours without anything breaking.

With Google sending as an account on our own domain, both can align. The return path is our domain, so SPF aligns. DKIM aligns once the domain's key is published and signing is switched on, which is what the google selector is for.

Why DKIM is the one to rely on

One aligned pass is enough, so why care which? Because this kind of mail gets forwarded. A client's office manager forwards your reminder to the accountant; a shared inbox forwards to a person. The forwarder now delivers your message from its own servers, and SPF, as RFC 7208 acknowledges in its appendix on forwarders, fails for forwarded mail by design. A DKIM signature travels with the message, and still verifies at the far end as long as nobody rewrote the signed parts.

So the practical rule: SPF alignment is a bonus, DKIM alignment is the requirement. If a service cannot sign with your domain, it should not be sending your invoices.

The ~all at the end of our SPF record is a soft fail, which RFC 7208 says receivers should not reject on alone. Under a DMARC reject policy that matters less: a forged message that soft-fails SPF and carries no aligned signature fails DMARC anyway.

The three ways it usually breaks

A second sender nobody enrolled. The accounting program that emails invoices as your domain through its own servers, the CRM that sends quotes, the old website's contact script. At p=reject, each one is either authorised and signing with your domain, or refused. DMARC's aggregate reports, sent to the address in the record's rua tag, list every source that tried to send as you. Read them before moving to reject, not after.

A visitor's address in From:. A contact form that sends an enquiry to you "from" the visitor's address is impersonating their domain, and their DMARC policy can get it refused. Ours sends from our own address and puts the visitor in Reply-To, so replying still reaches them and nothing claims to be them.

SPF's lookup limit. SPF evaluation may trigger at most ten DNS lookups, and every include counts, along with whatever the included record looks up in turn. Add enough providers and the record fails to evaluate at all.

How to check yours

Send one of your real transactional emails to a mailbox you control at a large provider, open the original message, and read the Authentication-Results header. You want dmarc=pass, and beside dkim=pass you want header.d= to show your domain, not your provider's. That header beats any DNS checker, because it reports what a receiver concluded about a real message rather than what your records say in theory.

The wider point is that an authentication pass is not the same as your domain passing. It is the trap in a feed that answers 200 with the wrong thing: the signal is real, and it is measuring something other than what you assumed. Check whose name is on the pass.

More notes