Created
July 11, 2016 04:10
-
-
Save alexpls/d25a57a97525a45db88738f4d5f15a5b to your computer and use it in GitHub Desktop.
Filter a list of domains keeping only those which have a valid MX record
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
awk '{print $1}' domains.txt | while read domain; do if [[ $(dig +noall +answer mx $domain) ]]; then echo $domain; fi; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment