diff --git a/linkcheck/checker/mailtourl.py b/linkcheck/checker/mailtourl.py index e29150e9..c2452579 100644 --- a/linkcheck/checker/mailtourl.py +++ b/linkcheck/checker/mailtourl.py @@ -319,7 +319,7 @@ class MailtoUrl(urlbase.UrlBase): username, domain = mail.rsplit('@', 1) log.debug(LOG_CHECK, "looking up MX mailhost %r", domain) try: - answers = resolver.query(domain, 'MX') + answers = resolver.resolve(domain, 'MX', search=True) except DNSException: answers = [] if len(answers) == 0: diff --git a/requirements.txt b/requirements.txt index 507caa23..72e826d1 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,6 +2,6 @@ beautifulsoup4 requests >= 2.4 pyxdg -dnspython +dnspython >= 2.0 # optional: argcomplete diff --git a/setup.py b/setup.py index cf4d9022..f5f231ee 100755 --- a/setup.py +++ b/setup.py @@ -378,7 +378,7 @@ setup( python_requires=">= 3.6", install_requires=[ "requests >= 2.4", - "dnspython", + "dnspython >= 2.0", "beautifulsoup4", "pyxdg", ], diff --git a/tox.ini b/tox.ini index 43f96794..c1d26e44 100644 --- a/tox.ini +++ b/tox.ini @@ -30,7 +30,7 @@ deps = beautifulsoup4 < 4.8.1 requests >= 2.4 pyxdg - dnspython + dnspython >= 2.0 {[base]deps} [testenv:flake8]