
On 5/28/25 19:40, Mark wrote:
I have jumped the gun on thinking that the template as a file was working. It's not. It's the same story: the initial file template is good, but it's for sure getting cached somewhere, and an updated file is ignored. The same as when the template was being drawn from the database.
Are you just updating the file /opt/mailman/mm/var/templates/lists/testlist.example.com/en/list:user:notice:welcome.txt with nothing in Postorius and either no entry at all in the mailman.template table with
name = 'list:user:notice:welcome' context = 'testlist.example.com'
or if there is such an entry, with
uri = 'file:///opt/mailman/mm/var/templates/lists/testlist.example.com/en/list:user:notice:welcome.txt'
If so, editing the file /opt/mailman/mm/var/templates/lists/testlist.example.com/en/list:user:notice:welcome.txt should work.
Restarting mailman3 and mailmanweb didn't help, neither did rebooting the server.
Looking at Gunicorn status, I see a failing connection to 127.0.0.1 which is the error message I was getting when adding a new subscriber - with the custom Welcome template in the database (which is why I moved it to file).
127.0.0.1 and locahost are in the ALLOWED_HOSTS and CSRF_TRUSTED_ORIGINS of the settings.py file
I'm at a loss with this caching problem. Any other clues happily received.
If as I say above, there is no entry in the mailman.template table for the name and context or if there is an entry with uri = 'file:///opt/mailman/mm/var/templates/lists/testlist.example.com/en/list:user:notice:welcome.txt', then gunicorn and mailman-web are not involved at all - mailman core will get the template from the file directly.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan