[Mailman-Users] editing of archive index.html file lost after post

Richard Barrett r.barrett at openinfo.co.uk
Fri Feb 13 20:59:13 CET 2004

On 13 Feb 2004, at 18:38, Richard D. Dover wrote:

> I edited the archive index.html folder for my mailing list. I also
> edited the date.html and subject.html to have the appearance I
> wanted. Everything looked good until there was a post.
> When a post is made to the list all my data is erased and the
> archive index.html, date.html, and subject.html went back to
> default.
> Why is this?

Because these pages are generated dynamically by Mailman when the 
underlying data changes, such as when a new post to the list is 
archived or the archive is rebuilt, so your hand edits to these pages 
are inevitably, and predictably, being lost.

> How can I change the archive files to look the way I want?

By changing the templates used to generate the things of interest to 
you. The default templates live in the directory structure underneath 
$prefix/Mailman/templates. The actual template file used for a given 
list is dynamically chosen per the following algorithm; the comments 
are quoted from $prefix/Mailman/Uils.py:

     # When looking for a template in a specific language, there are 4 
     # 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 
     # templates at the desired level, or, if you use only the default
     # templates, you don't need to change anything.  You should never 
     # 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 
     # by both the `lang' and `mlist' arguments.  The search order there 
     # 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 
     # language.  After that, the server default language is used for
     # <language>.  If that still doesn't yield a template, then the 
     # distribution's English language template is used as an ultimate
     # fallback.  If that's missing you've got big problems. ;)

Note that you should not make changes to the default templates under 
the $prefix/Mailman/templates directory as those changes will be lost 
when you next upgrade Mailman; put your changed templates under 
$prefix/templates/site/ if, for instance, you want them to apply to all 
lists on your server in place of the defaults. Or put them in host or 
list specific directories as described above. Templates in these 
locations are not changed by a Mailman upgrade.

Note that for performance reasons the templates are cached by the 
various qrunners while they are running. As a consquence you need to 
use mailmanctl restart after changing templates so that the qrunners 
will pick up the new versions from disk and incorporate them into their 

Richard Barrett                               http://www.openinfo.co.uk

More information about the Mailman-Users mailing list