domainaware / checkdmarc

A parser for SPF and DMARC DNS records
https://domainaware.github.io/checkdmarc
Apache License 2.0
251 stars 77 forks source link

Add Support for User Defined DNS Resolver Object #83

Closed stcz closed 1 year ago

stcz commented 2 years ago

This MR allows passing a user defined resolver object (dns.resolver.Resolver()) to the DNS Requests. This is useful, when you use functions, and you want to pass special options to the resolver object.

The Settings timeout and nameservers are ignored, when a resolver is given.

Please review or comment. I just tested it in my use case, but tried to adapt for all use cases.

I'm currently unsure how to handle the test_dnssec() function, especially the dns.query.udp() for me, it is OK to ignore it.