I'm trying to bring up mailman 3 in a spare vm prior to upgrading a production system from mailman 2.
One feature the existing mailman 2 lists uses that I can't get working with mailman 3 are templates. After using "mailman import21" I found files with names such as list:member:regular:footer.txt in the list tree. However they were ignored so I removed them I tried tried creating a template using the web postorius gui. When a message is injected, I see an error log from the out runner:
Apr 25 12:32:22 2026 (82977) Cannot connect to SMTP server 127.0.0.1 on port 25
Following the error message, the out runner goes cpu bound, creating and deleting queue files in queue/out with .pck and .bak extensions, very quickly.
I updated the code to print the exception and it tells a completely different story:
Apr 25 12:38:15 2026 (83339) Cannot connect to SMTP server 127.0.0.1 on port 25 (HTTPConnectionPool(host='localhost', port=8000): Max retries exceeded with url: /api/templates/list/test.example.com/list:member:regular:footer (Caused by NewConnectionError("HTTPConnection(host='localhost', port=8000): Failed to establish a new connection: [Errno 61] Connection refused")))
I'm using the default webservice port (8001) so I would not expect anything to ever be listening on 8000.
When I stop the runners, the problematic queue file is moved to the shunt queue.
Here's what I changed to get the exception detail:
mm 287 # pwd /usr/local/lib/python3.11/site-packages/mailman/runners mm 288 # diff -c /var/tmp/outgoing.py outgoing.py *** /var/tmp/outgoing.py Thu Apr 23 14:26:22 2026 --- outgoing.py Sat Apr 25 12:34:33 2026
*** 110,116 **** self._func, msg.get('message-id', 'n/a'))) self._func(mlist, msg, msgdata) self._logged = False ! except socket.error: # There was a problem connecting to the SMTP server. Log this # once, but crank up our sleep time so we don't fill the error # log. --- 110,116 ---- self._func, msg.get('message-id', 'n/a'))) self._func(mlist, msg, msgdata) self._logged = False ! except socket.error as e: # There was a problem connecting to the SMTP server. Log this # once, but crank up our sleep time so we don't fill the error # log.
*** 118,125 **** if port == 0: port = 'smtp' # Log this just once. if not self._logged: ! log.error('Cannot connect to SMTP server %s on port %s', ! config.mta.smtp_host, port) self._logged = True return True except SomeRecipientsFailed as error: --- 118,125 ---- if port == 0: port = 'smtp' # Log this just once. if not self._logged: ! log.error('Cannot connect to SMTP server %s on port %s (%s)', ! config.mta.smtp_host, port, e) self._logged = True return True except SomeRecipientsFailed as error: