Uncaught runner exception: The resolution lifetime expired
Hi!
We observe that some emails are being shunted with the following exception:
17/Feb/2024:19:01:28 (29) Uncaught runner exception: The resolution lifetime expired after 5.402 seconds: Server Do53:127.0.0.11@53 answered The DNS operation timed out.; Server Do53:127.0.0.11@53 answered The DNS operation timed out.; Server Do53:127.0.0.11@53 answered The DNS operation timed out.
17/Feb/2024:19:01:28 (29) Traceback (most recent call last):
File "/usr/lib/python3.11/site-packages/mailman/core/runner.py", line 179, in _one_iteration
self._process_one_file(msg, msgdata)
File "/usr/lib/python3.11/site-packages/mailman/core/runner.py", line 272, in _process_one_file
keepqueued = self._dispose(mlist, msg, msgdata)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/mailman/runners/pipeline.py", line 37, in _dispose
process(mlist, msg, msgdata, pipeline)
File "/usr/lib/python3.11/site-packages/mailman/core/pipelines.py", line 53, in process
handler.process(mlist, msg, msgdata)
File "/usr/lib/python3.11/site-packages/mailman/handlers/validate_authenticity.py", line 125, in process
authenticate(msg, msgdata)
File "/usr/lib/python3.11/site-packages/mailman/utilities/retry.py", line 47, in f_retry
return f(*args, **kwargs)
^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/mailman/handlers/validate_authenticity.py", line 93, in authenticate
auth_result = authenticate_message(
^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/authheaders/__init__.py", line 396, in authenticate_message
dmarc_result = check_dmarc(msg, spf_result, dkim_result, dnsfunc=dnsfunc, psddmarc=psddmarc)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/authheaders/__init__.py", line 344, in check_dmarc
result, result_comment, from_domain, policy = dmarc_per_from(from_domain, spf_result, dkim_result, dnsfunc, psddmarc)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/authheaders/__init__.py", line 91, in dmarc_per_from
record, orgdomain = receiver_record(from_domain)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/authheaders/dmarc_lookup.py", line 117, in receiver_record
retval = lookup_receiver_record(hostSansDmarc, dnsfunc)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/authheaders/dmarc_lookup.py", line 67, in lookup_receiver_record
answer = dnsfunc(dmarcHost)
^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/authheaders/dmarc_lookup.py", line 50, in dns_query
return query(name, qtype)
^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/dns/resolver.py", line 1598, in query
return resolve(
^^^^^^^^
File "/usr/lib/python3.11/site-packages/dns/resolver.py", line 1565, in resolve
return get_default_resolver().resolve(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/dns/resolver.py", line 1321, in resolve
timeout = self._compute_timeout(start, lifetime, resolution.errors)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/dns/resolver.py", line 1075, in _compute_timeout
raise LifetimeTimeout(timeout=duration, errors=errors)
dns.resolver.LifetimeTimeout: The resolution lifetime expired after 5.402 seconds: Server Do53:127.0.0.11@53 answered The DNS operation timed out.; Server Do53:127.0.0.11@53 answered The DNS operation timed out.; Server Do53:127.0.0.11@53 answered The DNS operation timed out.
17/Feb/2024:19:01:28 (29) SHUNTING: 1708196488.461441+e06c3c021252ca607e27ac8fb297be0e83d50afb
Examples of domains that caused this:
- _dmarc.improme.com
- _dmarc.o790.com
There is no DMARC record in those domains.
I'm not sure why Mailman 3 is trying to query those domains in the first place, but I don't think it should throw an uncaught exception in this case since domain records misconfiguration is not entirely unexpected, this might happen from time to time.
I can also provide shunted messages for examination if required.