brewedbits.dev

Personal blog with guides and news on selfhosting, Linux and AI, from the Netherlands

nextDash nextdash --aboutYour bookmarks. Your terminal. checks your links knows your Docker host one container, no cloudLive demo →nextdash.cc ↗

Tip: dig TXT reads SPF, DKIM and DMARC records straight from DNS

Dig
~/tips/tip-dig-txt-spf-dkim-dmarc

dig +short TXT example.com

Looks up SPF, DKIM and DMARC settings, which are stored as TXT records.

Mail problems often come down to one TXT record that is missing or has a typo. I check them with dig before I open any admin panel.

dig +short TXT example.com
dig +short TXT _dmarc.example.com
dig +short TXT selector1._domainkey.example.com

SPF lives in a TXT record on the domain itself, DMARC under the _dmarc label, and DKIM under <selector>._domainkey. The selector name comes from the mail provider. Long records are split into several quoted strings, which dig prints next to each other: a DKIM key shown in two pieces is normal. Ask a public resolver with @1.1.1.1 to rule out stale local caches.

Further reading: dig manual page

Going deeper: Guide: dig for beginners, look up DNS records and read the answer

More Dig tips dig +noall +answer DS example.com dig nope.iana.org @9.9.9.9 | grep -E 'status|SOA' dig +search nas dig @8.8.8.8 www.google.com +subnet=203.0.113.0/24 dig +yaml example.com A All Dig tips (36) All topics

Link