Docs

SPF, DKIM and DMARC: how Gmail knows your email is really from you

The three checks every mail service runs on your email, in plain words: which records imado gives you, why you add no SPF record, whether you need DMARC, and when to make it stricter.

Last updated

On this page7 sections

When you send an email from hello@yourbusiness.com, Gmail, Outlook and every other mail service ask one question before they put it in someone's inbox: did this really come from yourbusiness.com, or is someone pretending? Three checks answer it. They are called SPF, DKIM and DMARC.

You don't need to understand them to use imado. You add the records imado gives you when you connect your domain, and imado does the rest. This page is for when you want to know what they are, or someone asks you.

The short version

  • DKIM is a signature on every email you send. imado signs each one for you, and three records you add let other mail services check it. It is the one that matters most.
  • SPF is a list of the servers allowed to send your email. With imado you don't add one.
  • DMARC tells mail services what to do with an email that pretends to be from you. imado gives you one record for it, and it is optional.

When the checks pass, the service that receives your email knows it is really yours, and it is much more likely to reach the inbox instead of spam.

DKIM: a signature on every email

Every email imado sends from your address carries a signature that only your domain can make. The service that receives it looks up your domain to check the signature. If it matches, the service knows two things: the email came from your domain, and nobody changed it on the way.

Sign the mail you send3 records
  • CNAMENot found yet
    Host
    k4m2…._domainkey
    Value
    k4m2….dkim.amazonses.com
  • CNAMENot found yet
    Host
    p7ax…._domainkey
    Value
    p7ax….dkim.amazonses.com
  • CNAMENot found yet
    Host
    zq1n…._domainkey
    Value
    zq1n….dkim.amazonses.com
Three records that let Gmail, Outlook and the rest confirm a message really came from your domain; the check is called DKIM. Without them, what you send is likely to land in spam. The parts marked … are different for every domain; copy all three from your domain's page.

You add these three records once, copied from your domain's page in imado. imado doesn't send from your address until all three are found, so you never send an email that fails this check. If one isn't found, Set up email on a domain you just bought lists the usual reasons.

SPF: nothing to add

SPF is a list a domain publishes of the servers allowed to send its email. imado sends your email through Amazon's email service, and the check is made against Amazon's own list, which already includes it. That is why imado doesn't ask you for an SPF record. Some guides tell you to add include:amazonses.com; with imado you don't need it.

Warning

Don't add a second SPF record. If your domain already has one because another service sends email as you, such as a newsletter tool, leave it as it is. A domain can have only one: with two, the check fails for everything that relies on it.

DMARC: what to do with a fake

Anyone can put your address on an email, the way anyone can write any return address on an envelope. DMARC is a note you publish for mail services: if an email says it is from my domain but fails the checks, here is what to do with it. There are three choices:

  • none: nothing special. The service treats it like any other email, so it may still reach the inbox.
  • quarantine: put it in spam.
  • reject: refuse it.
Extra protection · optional1 record
  • TXTNot found yet
    Host
    _dmarc
    Value
    v=DMARC1; p=none;
Tells mail providers what to do with a message that fails the checks above. Nothing breaks without it.

The record imado gives you is set to none. Your email works without it, but it is worth adding: it shows mail services that someone looks after the domain, and Gmail requires one from anyone who sends more than 5,000 emails a day to Gmail addresses.

When to make it stricter

Changing none to quarantine sends fake emails that use your domain to spam. Make the change once you know every service that sends email as your domain, and each one is set up to sign for it. Besides imado, that might be a newsletter tool, the receipts from your online shop, or an app that emails your customers. Change it too early, and real emails from a service you forgot can land in spam too.

imado's own domain is set to quarantine, because everything we send comes through imado and passes the checks.

Note

If you change the record, your domain's page in imado shows it as Doesn't match. That is expected, and it changes nothing: your email keeps working.

A domain can have only one DMARC record. Some website builders add their own; the guides say what to do at each one.

Email you receive

The same checks run on every email that reaches your imado address. imado uses them so that a stranger can't pass as someone you know:

  • An AI app you connect sees a sender's name, such as "Acme Billing", only when the email passed DMARC. Otherwise it sees the bare address.
  • Forwarding passes on only email that passes the checks. The rest stays in your mailbox (Forwarding).
  • A webhook gets each result with the email, for your own code to judge (Webhooks).

See it for yourself

  1. Send an email from imado to a Gmail address.
  2. Open it in Gmail, open the ⋮ menu and choose Show original.
  3. Near the top are three lines. For email from imado they read SPF: PASS, DKIM: PASS with your domain, and DMARC: PASS.

If DKIM names a domain other than yours, or DMARC doesn't say PASS, write to us with the domain name; a person replies.

The details, for developers

  • SPF checks the envelope sender (the bounce address), not the From line. imado sends through Amazon SES without a custom MAIL FROM, so the envelope sender is at amazonses.com and SPF passes for that domain.
  • DMARC needs SPF or DKIM to pass for the From domain. SPF's domain isn't yours, so imado's mail passes DMARC on DKIM alone (d= your domain, aligned).
  • DKIM uses SES's Easy DKIM: the three CNAMEs point names under _domainkey at keys Amazon holds, so a key can change without a DNS edit.
  • The DMARC record is v=DMARC1; p=none; at _dmarc. imado compares it exactly, which is why a stricter policy or an added rua= reads as Doesn't match, and nothing waits on it.

Last updated