4.48. How can I change the HTML (or .txt) templates used by my mailing lists?
From the web interface:
If you click on "Edit the public HTML pages and text files" under "Other Administrative Activities" on the upper right hand side of the logged in admin page, you can edit the following from the web interface:
- General list information page
- Subscribe results page
- User specific options page
- Welcome email text file
- Digest masthead (starting with mailman 2.1.15)
The direct link to this editing page will look something like http://EXAMPLE.COM/mailman/edithtml/LISTNAME where you replace the sections in caps with your web domain and listname, respectively.
From the server:
Richard Barrett has answered this question in two excellent messages on the mailman-users mailing list. See http://mail.python.org/pipermail/mailman-users/2004-June/037497.html and http://mail.python.org/pipermail/mailman-users/2004-June/037650.html.
You should put your site and list specific changes as described in these comments form $prefix/Mailman/Utils.py:
# Make some text from a template file. The order of searches depends on # whether mlist and lang are provided. Once the templatefile is found, # string substitution is performed by interpolation in `dict'. If `raw' # is false, the resulting text is wrapped/filled by calling wrap(). # # When looking for a template in a specific language, there are 4 places # that are searched, in this order: # # 1. the list-specific language directory # lists/<listname>/<language> # # 2. the domain-specific language directory # templates/<list.host_name>/<language> # # 3. the site-wide language directory # templates/site/<language> # # 4. the global default language directory # templates/<language> # # The first match found stops the search. In this way, you can specialize # templates at the desired level, or, if you use only the default # templates, you don't need to change anything. You should never modify # files in the templates/<language> subdirectory, since Mailman will # overwrite these when you upgrade. That's what the templates/site # language directories are for. # # A further complication is that the language to search for is determined # by both the `lang' and `mlist' arguments. The search order there is # that if lang is given, then the 4 locations above are searched, # substituting lang for <language>. If no match is found, and mlist is # given, then the 4 locations are searched using the list's preferred # language. After that, the server default language is used for # <language>. If that still doesn't yield a template, then the standard # distribution's English language template is used as an ultimate # fallback. If that's missing you've got big problems. ;)
In http://mail.python.org/pipermail/mailman-users/2004-October/040452.html, Mark Sapiro notes:
If you want the "Subscribe results page" it is subscribe.html and it can also be edited via the lists "Edit the public HTML pages" link.
If you want the e-mail welcome message, it's subscribeack.txt.
The monthly password reminder template is cronpass.txt, and it is sent without a list context so a list specific or domain specific version of this template will not work, even if the list is the site list.
Converted from the Mailman FAQ Wizard
This is one of many Frequently Asked Questions.