Interview Prep/Networking/DNS & Service Discovery

What DNS records do you set up for company email?

BeginnerScenarioDNS & Service Discovery
Answer

Situation read → MX plus the three email authentication records.

What I'd do →

  1. Add MX records pointing to the mail provider with priorities
  2. Add an SPF TXT: v=spf1 include:_spf.google.com ~all
  3. Add DKIM as a TXT or CNAME record at selector._domainkey.example.com
  4. Add DMARC: _dmarc TXT "v=DMARC1; p=quarantine; rua=mailto:[email protected]"
  5. Check with dig TXT example.com +short and dig MX example.com +short

Why → SPF, DKIM and DMARC together keep your mail out of spam and stop spoofing of your domain.

Interview tip → Say DMARC should start at p=none with reporting, then move to quarantine and reject.

All Networking questions Roadmap: Networking for DevOps

More on DNS & Service Discovery