Header and footer templates in MM3
I read the earlier message from Peter Mueller about message decoration, and where the templates are in the file system. However, when I edit the header and footer templates in Postorius, those templates do not appear in the location specified. Should I be looking somewhere else? (I intend to write a program to rotate though several headers/footers, so I need to know where to have it write to.)
Gila Halpern
On 1/19/20 1:15 AM, Gila Halpern wrote:
I read the earlier message from Peter Mueller about message decoration, and where the templates are in the file system. However, when I edit the header and footer templates in Postorius, those templates do not appear in the location specified. Should I be looking somewhere else?
The templates created in Postorius are created in the postorius_emailtemplate table in Mailman's database and referenced via URLs like 'https://example.com/mailman3/api/templates/list/<list-id>/<template-name>'. I.e., they are not stored in the file system.
(I intend to write a program to rotate though several headers/footers, so I need to know where to have it write to.)
If Postorius has set a template for a list, it has set the URI for that template and list to one similar to that above and that URI ultimately references the template in the database.
You have choices. You can set the templates in Postorius and your program can do database queries to rotate the template text, or you can set the template URIs via Mailman's TemplateManager to file system paths or not set them and use the default paths (deleting them in Postorius will leave them unset). See <https://mailman.readthedocs.io/en/latest/src/mailman/rest/docs/templates.html>
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
I think that database queries would be better for my purposes, but it does lead me to a new problem. My MM3 installation is with Docker, which means that Docker set up the PostgreSQL database automatically, which means that I do not know the password for said database. Do I have any hope of finding it, or will I have to take a different option?
Never mind, I found it. For everyone else's edification, the username and password can be found in docker-compose.yaml
participants (3)
-
ghalpern@shemesh.co.il
-
Gila Halpern
-
Mark Sapiro