Mailman3 not able to deliver emails sent through list, but moderation notifications
Hello Mailman users,
I've been using Mailman2 for 10+ years and have recently upgraded to Debian Buster with Mailman3. I've tried to setup Mailman3 similarly but it fails to deliver emails sent through a list. I do receive all moderation notifications at the same time.
During startup /var/log/mailman3/mailman.log receives:
Cannot connect to SMTP server localhost on port 25
but I've made sure postfix is listening on *:25 for both IPv4 and IPv6.
When sending a message to a list the same file receives:
Nov 25 11:38:14 2022 (70371) ACCEPT: <MESSAGEID@HOST>
(message ID and host redacted) and nothing else happens: no more log messages, Postfix logs the email sent TO Mailman but doesn't log anything about emails sent BY Mailman.
If Mailman fails to send emails via Postfix I'd expect it to log error messages but it doesn't seem to do so.
I found this article stating the the SMTP error message might be misleading: https://blog.tfiu.de/mailman3-cannot-connect-to-smtp-server-localhost-on-por...
How to further debug this? What could be wrong with my Mailman3 instance and how to fix it?
Kind regards Daniel Böhmer
On 11/26/22 05:09, Daniel Böhmer wrote:
During startup /var/log/mailman3/mailman.log receives:
Cannot connect to SMTP server localhost on port 25
...
I found this article stating the the SMTP error message might be misleading: https://blog.tfiu.de/mailman3-cannot-connect-to-smtp-server-localhost-on-por...
How to further debug this? What could be wrong with my Mailman3 instance and how to fix it?
The article is relevant and mentions the most likely issue which is lack of permission on one or more message templates.
Everything in Mailman's var/ directory should be owned by Mailman's
user:group - normally list:list
in Debian packages.
I'm only guessing here, but I suspect you ran mailman import21
at some
point as root
. Never run mailman
commands as root
. Only run them
as the Mailman user - list
in Debian packages. Note that Mailman core
in Debian Buster is 3.2.1. Since 3.3.5, "The mailman command will refuse
to run as root unless the new --run-as-root option is specified." in
order to help avoid this issue.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
See after:
On 26/11/2022 18:18, Mark Sapiro wrote:
I found this article stating the the SMTP error message
might be misleading: https://blog.tfiu.de/mailman3-cannot-connect-to-smtp-server-localhost-on-por...
How to further debug this? What could be wrong with my Mailman3 instance and how to fix it?
The article is relevant and mentions the most likely issue which is lack of permission on one or more message templates.
Everything in Mailman's var/ directory should be owned by Mailman's user:group - normally
list:list
in Debian packages.
While this is always true for mailman-core, in some configurations the mailman-web files are also inside the ./var/ tree, and they need to be readable (and, for some, writable) by the process acting as webserver, which may or may not be list:list.
In my case (a bit off-piste) I have set mailman-web it up to run as owner=www-data, for example (I forget quite why this was needed now!!).
Regards
Ruth
-- Tel: 01223 414180 Blog: http://www.ivimey.org/blog LinkedIn: http://uk.linkedin.com/in/ruthivimeycook/
On 11/26/22 10:45, Ruth Ivimey-Cook wrote:
While this is always true for mailman-core, in some configurations the mailman-web files are also inside the ./var/ tree, and they need to be readable (and, for some, writable) by the process acting as webserver, which may or may not be list:list.
What configurations/files are these? Are there any others besides those
in the HYPERKITTY_ATTACHMENT_FOLDER
?
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
What configurations/files are these? Are there any others besides those in the HYPERKITTY_ATTACHMENT_FOLDER?
I searched all files /var/lib/mailman3 and the files owned by www-data are all in /var/lib/mailman3/web/:
root@host:/var/log/mailman3# ls -l /var/lib/mailman3/web/ total 0 drwxr-xr-x 1 www-data www-data 22 Jun 21 15:00 fulltext_index drwxr-xr-x 1 www-data www-data 150 Jun 21 14:13 static
Daniel
You are perfectly right. Thank you so much!
I wasted a whole lot of time fiddling with my Mailman3 instance and failed to see the point of the issue.
The error message is VERY MUCH misleading and I guess I am not the first one to complain and it’s been fixed in upstream or is planned to be. But your response was very helpful. Once I saw the problem the fix was as easy as:
find /var/lib/mailman3/ -user root -exec chown --changes list:list {} +
My Mailman3 seems now to be working fine.
Daniel
participants (3)
-
Daniel Böhmer
-
Mark Sapiro
-
Ruth Ivimey-Cook