[Python-modules-team] Bug#877785: python-dns: no useable dns server found when using caching dns e.g. only one entry in resolv.conf

Christoph Zysik support at ztk.me
Thu Oct 5 16:14:59 UTC 2017


Package: python-dnspython
Version: 1.15.0-1
Severity: normal
File: python-dns

Dear Maintainer,


I'm using local dns-cache to speed up lookups, my /etc/resolv.conf basically looks like
====
nameserver 127.0.0.1
====

Trying to do SPF lookups using postfix-policyd-spf led to temperrors, using debug mode showed
the error message "no useable dns servers found".

It goes back to https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=378991
when a patch has beend applied to get at least one nameserver when the first entry is for
search domain or something else than a valid nameserver entry.

This is an unexpected behaviour since the system does in fact have one, the local caching
DNS uses a seperate config-file for its nameservers.

The detection needs to be rwritten to make sure a valid nameserver has been found instead of
counting the lines.

To fix the issue ( if one knows what he's doing ) I had to comment out linde 63 and 64 in
/usr/lib/python3/dist-packages/DNS/Base.py
====
        if len(fields) < 2:
            continue
====

-- System Information:
Debian Release: 9.1
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable'), (499, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 4.10.17-3-pve (SMP w/8 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
Init: systemd (via /run/systemd/system)

Versions of packages python-dnspython depends on:
ii  python  2.7.13-2

python-dnspython recommends no packages.

python-dnspython suggests no packages.

-- no debconf information



More information about the Python-modules-team mailing list