Stephen J. Turnbull <steve@turnbull.jp> ezt írta (időpont: 2026. márc. 25., Sze, 5:25):
If Mailman is working as it should, there should be entries in Mailman's mailman.log showing the moderation action and in smtp.log showing the outgoing mail.
To be honest, I didn't quote logs because I didn't find anything upon first check. But now I looked again and found interesting entries.
I get different errors depending on whether I define the list:user:notice:rejected template.
When the template is not defined:
Mar 26 01:48:02 2026 (28606) Uncaught runner exception: 'ascii' codec can't encode character '\xed' in position 21: ordinal not in range(128) Mar 26 01:48:02 2026 (28606) Traceback (most recent call last): File "/opt/mailman/venv/lib/python3.11/site-packages/mailman/core/runner.py", line 179, in _one_iteration self._process_one_file(msg, msgdata) File "/opt/mailman/venv/lib/python3.11/site-packages/mailman/core/runner.py", line 272, in _process_one_file keepqueued = self._dispose(mlist, msg, msgdata) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/mailman/venv/lib/python3.11/site-packages/mailman/runners/incoming.py", line 80, in _dispose process(mlist, msg, msgdata, start_chain) File "/opt/mailman/venv/lib/python3.11/site-packages/mailman/core/chains.py", line 79, in process link.function(mlist, msg, msgdata) File "/opt/mailman/venv/lib/python3.11/site-packages/mailman/chains/reject.py", line 65, in _process bounce_message(mlist, msg, error) File "/opt/mailman/venv/lib/python3.11/site-packages/mailman/app/bounces.py", line 87, in bounce_message txt = MIMEText(notice, _charset=mlist.preferred_language.charset) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/email/mime/text.py", line 42, in __init__ self.set_payload(_text, _charset) File "/usr/lib/python3.11/email/message.py", line 342, in set_payload payload = payload.encode(charset.output_charset) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ UnicodeEncodeError: 'ascii' codec can't encode character '\xed' in position 21: ordinal not in range(128) Mar 26 01:48:02 2026 (28606) SHUNTING: 1774486082.6627975+afc236d96580c03921fa8a6f172f4a81eb2d20f6
And this is what happens when I define the template:
Mar 26 01:35:55 2026 (28606) Uncaught runner exception: HTTPConnectionPool(host='localhost', port=8000): Max retries exceeded with url: /mailman3/api/templates/list/ hirlevel.lista.autistaktol.hu/list:user:notice:rejected (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0xf46e5910>: Failed to establish a new connection: [Errno 111] Connection refused')) Mar 26 01:35:56 2026 (28606) Traceback (most recent call last): File "/opt/mailman/venv/lib/python3.11/site-packages/urllib3/connection.py", line 198, in _new_conn sock = connection.create_connection( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/mailman/venv/lib/python3.11/site-packages/urllib3/util/connection.py", line 85, in create_connection raise err File "/opt/mailman/venv/lib/python3.11/site-packages/urllib3/util/connection.py", line 73, in create_connection sock.connect(sa) ConnectionRefusedError: [Errno 111] Connection refused
The above exception was the direct cause of the following exception:
Traceback (most recent call last): File "/opt/mailman/venv/lib/python3.11/site-packages/urllib3/connectionpool.py", line 787, in urlopen response = self._make_request( ^^^^^^^^^^^^^^^^^^^ File "/opt/mailman/venv/lib/python3.11/site-packages/urllib3/connectionpool.py", line 493, in _make_request conn.request( File "/opt/mailman/venv/lib/python3.11/site-packages/urllib3/connection.py", line 445, in request self.endheaders() File "/usr/lib/python3.11/http/client.py", line 1277, in endheaders self._send_output(message_body, encode_chunked=encode_chunked) File "/usr/lib/python3.11/http/client.py", line 1037, in _send_output self.send(msg) File "/usr/lib/python3.11/http/client.py", line 975, in send self.connect() File "/opt/mailman/venv/lib/python3.11/site-packages/urllib3/connection.py", line 276, in connect self.sock = self._new_conn() ^^^^^^^^^^^^^^^^ File "/opt/mailman/venv/lib/python3.11/site-packages/urllib3/connection.py", line 213, in _new_conn raise NewConnectionError( urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPConnection object at 0xf46e5910>: Failed to establish a new connection: [Errno 111] Connection refused
The above exception was the direct cause of the following exception:
Traceback (most recent call last): File "/opt/mailman/venv/lib/python3.11/site-packages/requests/adapters.py", line 667, in send resp = conn.urlopen( ^^^^^^^^^^^^^ File "/opt/mailman/venv/lib/python3.11/site-packages/urllib3/connectionpool.py", line 841, in urlopen retries = retries.increment( ^^^^^^^^^^^^^^^^^^ File "/opt/mailman/venv/lib/python3.11/site-packages/urllib3/util/retry.py", line 519, in increment raise MaxRetryError(_pool, url, reason) from reason # type: ignore[arg-type] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='localhost', port=8000): Max retries exceeded with url: /mailman3/api/templates/list/ hirlevel.lista.autistaktol.hu/list:user:notice:rejected (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0xf46e5910>: Failed to establish a new connection: [Errno 111] Connection refused'))
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/opt/mailman/venv/lib/python3.11/site-packages/mailman/core/runner.py", line 179, in _one_iteration self._process_one_file(msg, msgdata) File "/opt/mailman/venv/lib/python3.11/site-packages/mailman/core/runner.py", line 272, in _process_one_file keepqueued = self._dispose(mlist, msg, msgdata) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/mailman/venv/lib/python3.11/site-packages/mailman/runners/incoming.py", line 80, in _dispose process(mlist, msg, msgdata, start_chain) File "/opt/mailman/venv/lib/python3.11/site-packages/mailman/core/chains.py", line 79, in process link.function(mlist, msg, msgdata) File "/opt/mailman/venv/lib/python3.11/site-packages/mailman/chains/reject.py", line 61, in _process template = getUtility(ITemplateLoader).get( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/mailman/venv/lib/python3.11/site-packages/mailman/model/template.py", line 192, in get contents = getUtility(ITemplateManager).get( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/mailman/venv/lib/python3.11/site-packages/mailman/database/transaction.py", line 106, in wrapper return function(args[0], config.db.store, *args[1:], **kws) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/mailman/venv/lib/python3.11/site-packages/mailman/model/template.py", line 114, in get contents = protocols.get(actual_uri, **auth) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/mailman/venv/lib/python3.11/site-packages/mailman/utilities/protocols.py", line 39, in get response = requests.get(url, timeout=REQUEST_TIMEOUT, **kws) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/mailman/venv/lib/python3.11/site-packages/requests/api.py", line 73, in get return request("get", url, params=params, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/mailman/venv/lib/python3.11/site-packages/requests/api.py", line 59, in request return session.request(method=method, url=url, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/mailman/venv/lib/python3.11/site-packages/requests/sessions.py", line 589, in request resp = self.send(prep, **send_kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/mailman/venv/lib/python3.11/site-packages/requests/sessions.py", line 703, in send r = adapter.send(request, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/mailman/venv/lib/python3.11/site-packages/requests/adapters.py", line 700, in send raise ConnectionError(e, request=request) requests.exceptions.ConnectionError: HTTPConnectionPool(host='localhost', port=8000): Max retries exceeded with url: /mailman3/api/templates/list/ hirlevel.lista.autistaktol.hu/list:user:notice:rejected (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0xf46e5910>: Failed to establish a new connection: [Errno 111] Connection refused')) Mar 26 01:35:56 2026 (28606) SHUNTING: 1774485356.0147583+a9648ecc2a0fd3ad96da4826dcad177399e83c42
I have so many questions...
- What is it about the ASCII encoding? "ordinal not in range(128)"? What do we even do with ASCII in 2026? I tried to send a message that only contains ASCII characters, but the result was the same, so it's probably not in the e-mail contents.
- I configured uwsgi to listen on 127.8.0.1:8000, practically because I didn't want to litter the main 127.0.0.1 address with a plethora of ports. Why does it ever want to use localhost:8000 for anything? Grepping through the config files, I'm consistent about 127.8.0.1:8000, where does it get localhost (that is 127.0.0.1) from? All other functionality of Mailman seems to work with my configuration, that's why I wasn't suspicious that any address/port might be misconfigured.
Here's where port 8000 is mentioned:
# grep ":8000" /etc/mailman3/* /etc/mailman3/mailman-hyperkitty.cfg:base_url: http://127.8.0.1:8000/archives/ /etc/mailman3/uwsgi.ini:http-socket = 127.8.0.1:8000
Any ideas how to fix it?