Skip to content

Instantly share code, notes, and snippets.

@mitcharoo
Created June 14, 2022 04:58
Show Gist options
  • Save mitcharoo/f56e12e8b1d2e4633124a2449badfeb5 to your computer and use it in GitHub Desktop.
Save mitcharoo/f56e12e8b1d2e4633124a2449badfeb5 to your computer and use it in GitHub Desktop.
Bash script to quickly verify SPF and DMARC records for a list of domains
#!/bin/bash
# Quickly verify SPF and DMARC records for a list of domains
# Load domain names in list_domains and let 'er rip
list_domains=""
for domain in $list_domains
do
dig -t txt "$domain" | grep "v=spf1*" &&
dig -t txt "_dmarc.$domain" | grep "v=DMARC*"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment