diff --git a/src/pretix/control/views/mailsetup.py b/src/pretix/control/views/mailsetup.py index d436294fc2..1399a9915f 100644 --- a/src/pretix/control/views/mailsetup.py +++ b/src/pretix/control/views/mailsetup.py @@ -42,7 +42,8 @@ logger = logging.getLogger(__name__) def get_spf_record(hostname): try: - for resp in dns.resolver.resolve(hostname, 'TXT'): + r = dns.resolver.Resolver() + for resp in r.query(hostname, 'TXT'): data = b''.join(resp.strings).decode() if data.lower().strip().startswith('v=spf1 '): # RFC7208, section 4.5 return data diff --git a/src/setup.py b/src/setup.py index 5cbd2fe045..5ced27ad9d 100644 --- a/src/setup.py +++ b/src/setup.py @@ -190,7 +190,7 @@ setup( 'django-scopes==1.2.*', 'django-statici18n==2.1.*', 'djangorestframework==3.12.*', - 'dnspython==2.2.*', + 'dnspython<2.0', # do not upgrade, causes issues with eventlet / gunicorn 19 and we cannot upgrade gunicorn right now 'drf_ujson2==1.6.*', 'isoweek', 'jsonschema',