Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save ddtxra/3edf839bdf347091451f0d14dfbe26ac to your computer and use it in GitHub Desktop.
Save ddtxra/3edf839bdf347091451f0d14dfbe26ac to your computer and use it in GitHub Desktop.
Check for mailservers validity with DIG MX and AWK
cat domains.txt | awk 'BEGIN { ORS="\t" }; {print $1; system("dig +short mx "$1" | wc -l")}' > mailservers-declared-for-domain.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment