Last active
April 28, 2022 08:44
-
-
Save dansimau/0c37f2e24abebe97191de032286558d6 to your computer and use it in GitHub Desktop.
Recursively return all SPF includes for a given domain
This file contains 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
spfincludelookup() { for entry in $(dig +short TXT "$@" |grep --color=never spf); do [ "${entry:0:7}" == "include" -o "${entry:0:6}" == "exists" ] && echo $entry && spfincludelookup ${entry:8}; done; } | |
spfincludelookup "$@" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Usage:
Count number of records (should be less than the SPF spec limit of 10):