After server upgrade debian 11→12 and reinstalling everything in (venv), I got this error when accessing → mailman3/lists

File "/opt/mailman/venv/lib/python3.11/site-packages/mailmanclient/restbase/connection.py", line 160, in call raise HTTPError(params.get('url'), response.status_code, urllib.error.HTTPError: HTTP Error 500: {"title": "500 Internal Server Error"} ERROR 2025-08-16 19:26:03,720 6588 django.request Internal Server Error: /mailman3/lists/mylist.myserver.tld
Can anyone help? Other things do work, including archives, users, domains etc.

On 8/16/25 7:30 PM, Wikinaut wrote:
File "/opt/mailman/venv/lib/python3.11/site-packages/mailmanclient/restbase/connection.py", line 160, in call raise HTTPError(params.get('url'), response.status_code, urllib.error.HTTPError: HTTP Error 500: {"title": "500 Internal Server Error"} ERROR 2025-08-16 19:26:03,720 6588 django.request Internal Server Error: /mailman3/lists/mylist.myserver.tld
Can anyone help? Other things do work, including archives, users, domains etc.
Is there an associated message in mailman.log?
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan

there is no new ~/mm/var/logs/mailman.log file. I gzip-ed the old one and triggered the bug again.

On 8/16/25 7:53 PM, Wikinaut wrote:
there is no new ~/mm/var/logs/mailman.log file. I gzip-ed the old one and triggered the bug again.
Your original error says that mailmanclient sent a request to mailman core's REST API and received a 500 response. Mailman core should log the error that produces the 500 response.
If it doesn't, perhaps there is some permissions issue preventing writing the log.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan

I already made all files owned by mailman:mailman and restartet (I will do this again).
Here ist the full error stack (redacted) https://dpaste.com/AQPMYEHEK.txt

I created another (venv) and decided to go through all steps of a full installation.
→→→ it works!

On Sat, Aug 16, 2025 at 11:40 PM Wikinaut <mail@tgries.de> wrote:
I created another (venv) and decided to go through all steps of a full installation.
→→→ it works!
With a Python version change, I discovered that creating a clean virtual environment is the best approach.
-- Best regards, Odhiambo WASHINGTON, Nairobi,KE +254 7 3200 0004/+254 7 2274 3223 In an Internet failure case, the #1 suspect is a constant: DNS. "Oh, the cruft.", egrep -v '^$|^.*#' ¯\_(ツ)_/¯ :-) [How to ask smart questions: http://www.catb.org/~esr/faqs/smart-questions.html]

Odhiambo Washington via Mailman-users writes:
On Sat, Aug 16, 2025 at 11:40?PM Wikinaut <mail@tgries.de> wrote:
I created another (venv) and decided to go through all steps of a full installation.
With a Python version change, I discovered that creating a clean virtual environment is the best approach.
As far as I know the venv module doesn't support a major (3.x to 3.y) version change at all. But even within a major version, if you're going to take the (slight) risk of a Python upgrade for the unknown benefits of the Python upgrade, you likely want the same for the whole suite of requirements.
-- GNU Mailman consultant (installation, migration, customization) Sirius Open Source https://www.siriusopensource.com/ Software systems consulting in Europe, North America, and Japan

and mails appear not to be processed any more.
One mail came through, but look to the third lien of the footer, some variables are not replaced by their values:
berlin mailing list -- berlin@xxxxx.de To unsubscribe send an email to berlin-leave@xxxxx.de %(web_page_url)slistinfo/%(_internal_name)s

On 8/16/25 8:14 PM, Wikinaut wrote:
and mails appear not to be processed any more.
One mail came through, but look to the third lien of the footer, some variables are not replaced by their values:
berlin mailing list -- berlin@xxxxx.de To unsubscribe send an email to berlin-leave@xxxxx.de %(web_page_url)slistinfo/%(_internal_name)s
This line is from a msg_footer imported from Mailman 2.1 by 'mailman import21'. The substitutions are not replaced because they are MM 2.1 syntax which MM 3 doesn't recognize.
If you have Mailman core >=3.3.10 and have set the Base Url parameter for the domain, you can replace that line in the template with simply
$mailinglist_url
If your Mailman core is older, you need to hardcode that as something like
https://example.com/mailman3/lists/$list_id
I'm only guessing here, but I suspect that you have some directories/files in the /opt/mailman/mm/var/templates/ hierarchy with mode and ownership such that they aren't readable by the Mailman user.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan

Thank you. As I need to go through ~20 mailing lists, is there any way to programmatically also modify the templates?
I could not find a script for doing this but it would nice to have, as I managed, as known, to write and to run scripts, which is very helpful (because we re-generate the _whole_ mailsystem daily if there are changes in our membership database).
Thus a script to fix (at least) ml footers would also be great!

On 8/18/25 12:06 PM, Wikinaut wrote:
Thank you. As I need to go through ~20 mailing lists, is there any way to programmatically also modify the templates?
I could not find a script for doing this but it would nice to have, as I managed, as known, to write and to run scripts, which is very helpful (because we re-generate the _whole_ mailsystem daily if there are changes in our membership database).
If you want to use default templates for everything, just remove everything under /opt/mailman/mm/var/templates/.
If you want a custom footer for all lists, remove list:member:generic:footer.txt from all the /opt/mailman/mm/var/templates/lists/LIST_ID/LC/ directories and create the footer at /opt/mailman/mm/var/templates/site/LC/list:member:generic:footer.txt
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
participants (4)
-
Mark Sapiro
-
Odhiambo Washington
-
Stephen J. Turnbull
-
Wikinaut