Snawoot / postfix-mta-sts-resolver

Daemon which provides TLS client policy for Postfix via socketmap, according to domain MTA-STS policy
MIT License
117 stars 23 forks source link

mta-sts-query returns NONE instead of FETCH_ERROR when DNS error #60

Closed JakubOnderka closed 4 years ago

JakubOnderka commented 4 years ago

Describe the bug When invalid DNS server is set or if DNS server is not responding, error mta-sts-query returns STSFetchResult.NONE instead of STSFetchResult.FETCH_ERROR

To Reproduce Steps to reproduce the behavior:

  1. Set invalid DNS server in /etc/resolv.conf
  2. Run for example mta-sts-query dismail.de
  3. Check command output

Expected behavior (<STSFetchResult.FETCH_ERROR: 2>, None)

Output listings (<STSFetchResult.NONE: 0>, None)

Environment (please complete the following information):

Additional context Error returned for DNS request: (11, 'Could not contact DNS servers')

Version installed from Ubuntu repo.

# apt info postfix-mta-sts-resolver
Package: postfix-mta-sts-resolver
Version: 0.7.5-1
Priority: optional
Section: universe/mail
Origin: Ubuntu
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Original-Maintainer: Benjamin Hof <vexel@vexel.net>
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Installed-Size: 124 kB
Pre-Depends: init-system-helpers (>= 1.54~)
Depends: python3-aiodns, python3-aiohttp, python3-yaml, python3:any, adduser, ca-certificates, python3-aiosqlite, python3-aioredis
Recommends: python3-uvloop
Enhances: postfix
Homepage: https://github.com/Snawoot/postfix-mta-sts-resolver
Download-Size: 30.0 kB
APT-Manual-Installed: yes
APT-Sources: http://archive.ubuntu.com/ubuntu focal/universe amd64 Packages
Description: Daemon providing MTA-STS map to Postfix
Snawoot commented 4 years ago

Fixed in v0.8.1