search for ALL DNS TXT records of a domain and subdomains
To get all the records of a domain, you use an AXFR
request to perform a zone transfer. This must be sent to one of the authoritive servers for the domain:
dig rosposhop.com axfr @ns52.domaincontrol.com
However, most DNS servers restrict zone transfers for security reasons. Normally, only the master server allows zone transfers, and only to the known slave servers. The domaincontrol.com
servers don't allow zone transfers, so you'll get an error if you try this.
The approach of making a single DNS query to get all that information in one fell swoop is misguided. It assumes that the data for a single zone is a) static and b) managed by a single name server. DNS imposes no such limitations on zone data.
Both SPF and DKIM (and DMARC, if you want to throw that in the mix) use TXT records on specific domains. There is no need to get all the TXT records for a domain and its subdomains to view the relevant configuration.
If you want to get the SPF and DKIM information, just query the appropriate domains. Assuming you're doing Return-Path domains and DKIM signatures on md.rosposhop.com
and mg.rosposhop.com
then you should be interested in TXT records on
md.rosposhop.com
- SPFmg.rosposhop.com
- SPF(selector)._domainkey.md.rosposhop.com
- DKIM(selector)._domainkey.mg.rosposhop.com
- DKIM
where (selector) is the selector you're using for that DKIM record. You may have more than one selector for each of md.rosposhop.com
and mg.rosposhop.com
domains. TXT records on other domains are irrelevant.