On 2024-04-22 14:07, Mark Sapiro wrote:
I think you must be setting the custom template via Postorius and your Django setting for POSTORIUS_TEMPLATE_BASE_URL is wrong. It should be set to the scheme and host you use to access Postorius. I.e, if you normally access Postorius via something like https://example.com/mailman3 set
POSTORIUS_TEMPLATE_BASE_URL = 'https://example.com'
It is probably now set as
POSTORIUS_TEMPLATE_BASE_URL = 'http://<REDACTED-PUBLIC-IPv4-ADDRESS>'
================================================================================
There was no line POSTORIUS_TEMPLATE_BASE_URL in /etc/mailman3/settings.py
So I've now added the line: POSTORIUS_TEMPLATE_BASE_URL = 'https://lists.mydomain.com'
Checked in settings.py that:
- "lists.mydomain.com" is in ALLOWED_HOSTS; and
- "https://lists.mydomain.com" is in CSRF_TRUSTED_ORIGINS
Restarted everything...
rm /opt/mailman/mm/var/locks/* systemctl restart mailman3 systemctl restart mailmanweb systemctl daemon-reload systemctl restart qcluster
# pstree systemd─┬─
├─gunicorn───gunicorn
├─mailman-web───mailman-web───4*[mailman-web]
├─nginx───2*[nginx]
├─postgres───18*[postgres]
├─python3─┬─11*[python3]
│ ├─python3───{python3}
│ └─python3───2*[python3]
I deleted the custom Welcome template via the WebUI (Postorius), and checked it was removed from the database (PostGres mailman.template).
Then, as site-owner, creating a new custom Welcome template (again via the WebUI) I can see it correctly added to the database in mailman.template.uri
Previously it was writing ...
So far so good. Nothing showing in mailmanweb.log yet.
Then, still as site-owner using Postorius, I mass-subscribed a new member (pre confirm, pre approve, pre verify all ticked).
The error below displays on the webpage, the member is subscribed, but no custom welcome message emailed out.
=================================== HTTP Error 400: HTTPSConnectionPool(host='lists.mydomain.com', port=443): Read timed out. (read timeout=5)
And the syslog shows a ton of issues, starting with:
===================================
2024-04-22T23:39:27.536002+00:00 lists mailman[1317]: Apr 22 23:39:27
2024 (1317) HTTPSConnectionPool(host='<LISTS.MYDOMAIN.COM>', port=443):
Read timed out. (read timeout=5)
2024-04-22T23:39:27.537648+00:00 lists mailman[1317]: Traceback (most
recent call last):
2024-04-22T23:39:27.537681+00:00 lists mailman[1317]: File
"/opt/mailman/venv/lib/python3.11/site-packages/urllib3/connectionpool.py",
line 536, in _make_request
2024-04-22T23:39:27.537700+00:00 lists mailman[1317]: response =
conn.getresponse()
2024-04-22T23:39:27.537717+00:00 lists mailman[1317]:
^^^^^^^^^^^^^^^^^^
2024-04-22T23:39:27.537740+00:00 lists mailman[1317]: File
"/opt/mailman/venv/lib/python3.11/site-packages/urllib3/connection.py",
line 461, in getresponse
2024-04-22T23:39:27.537757+00:00 lists mailman[1317]:
httplib_response = super().getresponse()
2024-04-22T23:39:27.537772+00:00 lists mailman[1317]:
^^^^^^^^^^^^^^^^^^^^^
2024-04-22T23:39:27.537790+00:00 lists mailman[1317]: File
"/usr/lib/python3.11/http/client.py", line 1374, in getresponse
I removed the custom welcome message and the newly subscribed members. The default "You've been unsubscribed" notice got emailed out okay.
Then mass subscribing a member, the default welcome message gets emailed out okay and no error displayed on the webpage.
I have no idea what the report in syslog is saying, or where to look next. Any help appreciated.