mailspoof icon indicating copy to clipboard operation
mailspoof copied to clipboard

"The DNS response does not contain an answer to the question"

Open maxdemajo opened this issue 6 years ago • 2 comments

Getting the following error: "dns.resolver.NoAnswer: The DNS response does not contain an answer to the question: [DOMAIN.COM]. IN TXT"

Happening with multiple domains in a list. Domains exist and are registered but are not being found. A catch would also be nice to continue on resolving other domains and see results.

maxdemajo avatar Oct 09 '19 08:10 maxdemajo

Hey @maxdemajo

I realise it's been a while since you opened this, but do you have any example I could test on?

serain avatar Oct 23 '20 07:10 serain

Hi, @maxdemajo and @serain: I meet the same problem and found the solution: Once there is a domain has no TXT record, it will rise this error. The solution is: In mailspoof/scanners.py file: txt_records = self.resolver.query(domain, 'TXT') change to:

try:
        txt_records = self.resolver.query(domain, 'TXT')
except:
        txt_records = []

I am a little bit lazy and did not add Error info after exception....

hughwangmail avatar Jan 22 '22 15:01 hughwangmail