Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save shankar-bavan/84d21adaf216ad313dcf6dafa09af3c1 to your computer and use it in GitHub Desktop.
Save shankar-bavan/84d21adaf216ad313dcf6dafa09af3c1 to your computer and use it in GitHub Desktop.
DKIM, SPF, and DMARC check via command line

SPF record check

  • Open the command line (Start > Run > cmd).
  • Enter nslookup -type=txt followed by a space and a domain or hostname, for example, nslookup -type=txt google.com.
  • If an SPF record exists, the result will be something like this: v=spf1 include:_spf.google.com ~all.
  • If there are no results or no v=spf1, then there is a problem getting the record for the domain, or it doesn’t exist.

DKIM record check

  • Open the command line (Start > Run > cmd).
  • In the command window, type nslookup > Enter.
  • Type set q=txt > Enter.
  • Type selector._domainkey.domain.com > Enter.

DMARC policy check

  • Open the command line (Start > Run > cmd).
  • Type nslookup -type=txt _dmarc.domain.com, for example, nslookup -type=txt _dmarc.google.com, > Enter.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment