Guys,
This has been fixed and was nothing to do with the SMTP server.
I stepped through the code of the outgoing runner and found that an exception was being handled and giving an unhelpful error message. Once I got to the real exception I found it was due to this error:
https://lists.mailman3.org/archives/list/mailman-users@mailman3.org/message/...
downgrading importlib_resources fixed the issue straight away.
Thanks. Andrew.
From: Andrew Hodgson Sent: 28 March 2020 16:41 To: mailman-users@mailman3.org Subject: Mailman3 moving to new server, not able to establish SMTP connection
Hi,
Whilst we are all stuck in doors I have started a project to move Mailman3 from a Docker installation to a new server using a Python venv. Old server was Debian Jessie and the new one is Buster. Using Exim with stock config.
Everything seems to be going ok but mail isn't delivering (cannot connect to SMTP server).
I have /opt/mailman which I did chown -R list:list
mailman.cfg has following MTA settings: [mta] incoming: mailman.mta.exim4.LMTP configuration: python:mailman.config.exim4
I wrote a Systemd unit which starts Mailman from the venv and started up Mailman once I got Postgres sorted so it would create the necessary files in the var directory structure.
One thing I noticed and had to fix is that it doesn't creat the directories for existing lists, and the Exim config examples out there check for the existance of those directories to identify whether the address exists. I created those anyway and set ownership perms as before.
Once I fixed that I sent a test message to the owner address and that routed correctly and the headers indicated the message was sent back to localhost by Mailman.
However I can't get it to route a list message, here is a log showing the start of the Mailman master processes and me sending a test message from Outlook (so incoming mail is routing ok): Mar 28 16:03:20 2020 (21877) Master started Mar 28 16:03:32 2020 (21889) lmtp runner started. Mar 28 16:03:32 2020 (21896) virgin runner started. Mar 28 16:03:32 2020 (21887) command runner started. Mar 28 16:03:32 2020 (21890) nntp runner started. Mar 28 16:03:32 2020 (21886) bounces runner started. Mar 28 16:03:33 2020 (21892) pipeline runner started. Mar 28 16:03:33 2020 (21888) in runner started. Mar 28 16:03:33 2020 (21895) retry runner started. Mar 28 16:03:34 2020 (21894) rest runner started. [2020-03-28 16:03:34 +0000] [21894] [INFO] Starting gunicorn 20.0.4 [2020-03-28 16:03:34 +0000] [21894] [INFO] Listening at: http://127.0.0.1:8001 (21894) [2020-03-28 16:03:34 +0000] [21894] [INFO] Using worker: sync [2020-03-28 16:03:34 +0000] [21963] [INFO] Booting worker with pid: 21963 Mar 28 16:03:34 2020 (21885) archive runner started. [2020-03-28 16:03:34 +0000] [21965] [INFO] Booting worker with pid: 21965 Mar 28 16:03:34 2020 (21897) digest runner started. Mar 28 16:03:36 2020 (21891) out runner started. Mar 28 16:04:25 2020 (21888) ACCEPT: <AM0PR08MB39085771D0E2D9114FDE8E83AFCD0@AM0PR08MB3908.eurprd08.prod.outlook.com<mailto:AM0PR08MB39085771D0E2D9114FDE8E83AFCD0@AM0PR08MB3908.eurprd08.prod.outlook.com>> Mar 28 16:04:26 2020 (21885) HyperKitty archived message <AM0PR08MB39085771D0E2D9114FDE8E83AFCD0@AM0PR08MB3908.eurprd08.prod.outlook.com<mailto:AM0PR08MB39085771D0E2D9114FDE8E83AFCD0@AM0PR08MB3908.eurprd08.prod.outlook.com>> to https://lists.hodgsonfamily.org/hyperkitty/list/blind-sysadmins@lists.hodgso... [28/Mar/2020:16:04:26 +0000] "GET /3.0/lists/blind-sysadmins@lists.hodgsonfamily.org<mailto:/3.0/lists/blind-sysadmins@lists.hodgsonfamily.org> HTTP/1.1" 200 445 "-" "GNU Mailman REST client v3.3.0" Mar 28 16:04:27 2020 (21891) Cannot connect to SMTP server localhost on port 25 [28/Mar/2020:16:04:27 +0000] "GET /3.0/lists/blind-sysadmins@lists.hodgsonfamily.org/config<mailto:/3.0/lists/blind-sysadmins@lists.hodgsonfamily.org/config> HTTP/1.1" 200 2595 "-" "GNU Mailman REST client v3.3.0" [28/Mar/2020:16:04:27 +0000] "GET /3.0/users/andrew@hodgson.io<mailto:/3.0/users/andrew@hodgson.io> HTTP/1.1" 200 439 "-" "GNU Mailman REST client v3.3.0"
Now in the out queue I have this:
root@elrond:/opt/mailman# ls -la /opt/mailman/var/queue/out total 32 drwxrwx--- 2 list list 4096 Mar 28 16:34 . drwxr-xr-x 14 list list 4096 Mar 28 13:25 .. -rw-rw---- 1 list list 11152 Mar 28 16:34 1585413255.2412584+390ab148e589108ed9e849445e5e90410f69def3.bak -rw-rw---- 1 list list 11152 Mar 28 16:34 1585413255.4891446+75bde47331619263b05f582c28ceb85a13bb5265.pck.tmp
There is no connection attempt in the Exim log from Mailman and I can connect to localhost:25.
This is a dualstack machine and I was wondering whether we had any IPV6 issues (I had an issue with Gunicorn and Nginx routing traffic due to this earlier that I had to sort), but as owner addresses are working I don't know what is different on that.
Any suggestions? Thanks. Andrew.