← All controls

4 Email authentication (SPF/DKIM/DMARC)

Email is easy to spoof. SPF, DKIM and DMARC exist to let the receiving server verify that mail claiming to come from your domain actually did, which is what stops an attacker spoofing your domain to your own staff and to your partners. This is mostly a one-time setup task in the DNS settings of your domain (see the air-gapped recovery kit, №57).

Visual explainer Why emails have three sender names, and what DMARC actually chains together

Caveats

Setup steps

  1. open ↗

    Apps › Google Workspace › Gmail › Authenticate email

    TXT google._domainkey = <value from console>
  2. TXT @ = v=spf1 include:_spf.google.com ~all
  3. TXT _dmarc = v=DMARC1; p=none; rua=mailto:dmarc@<domain>; adkim=s; aspf=s

Ongoing maintenance

How to verify

  1. Go to https://www.learndmarc.com/ and send an email to see if everything is set up correctly.

  2. Alternatively, if you know your way around a terminal: Check all three records directly from your machine:

    ```dig +short TXT <domain> | grep spf1; dig +short TXT google._domainkey.<domain>; dig +short TXT _dmarc.<domain>```

  3. SPF must end in ~all or -all, the DKIM key must be 2048-bit, and DMARC must carry p=quarantine or p=reject with a rua= address that is monitored.

v0.2.0 Prevent edition All (DNS-side) policy #6 · #27 ↗