5.11.3. Class DNSResolver

DNSResolver policies query the domain name server to resolve domain names.

Example 5.31. A simple DNSResolver policy

Below is a simple DNSResolver policy enabled to return multiple 'A' and 'AAAA' records from the nameserver 1.1.1.1 with 2s timeout.

ResolverPolicy(name="Mailservers", resolver=DNSResolver(name_server='1.1.1.1', timeout=2))