[Mailman-Users] patch to add date to each meassge in mail archive Index

Matt Ryanczak ryanczak at arin.net
Mon Sep 12 19:19:26 CEST 2005

I was asked to make the date for each message in a mailman archive be
visible in the index for that month. This required that I modify
HyperArch.py and the template file archidxentry.html. I thought others
might find this useful so here are the relevant patches for the
mailman-2.1.6 source tree. 

I apologize if this is a duplication of someone else efforts, I searched
around and could not find a way to do this in mailman as it was or a
patch to do the same.

Matt Ryanczak
American Registry for Internet Numbers
Lead System Administrator

Apply the following patches to your mailman source tree and setup as
usual. You should be able to patch a live copy of mailman without issue
though you will have to modify the patch files according to the prefix
mailman is installed in. If you patch a live mailman install you'll have
to run "$PREFIX/bin/arch --wipe $LISTNAME" for each list hosted by that
mailman installation.

--- HyperArch.py        2005-09-12 11:29:44.000000000 -0400
+++ mailman-2.1.6/Mailman/Archiver/HyperArch.py    	  2005-05-13
07:35:37.000000000 -0400
@@ -1024,7 +1024,6 @@
     def write_index_entry(self, article):
         subject = self.get_header("subject", article)
         author = self.get_header("author", article)
-        datestr = self.get_header("datestr", article)
                 author = re.sub('@', _(' at '), author)
@@ -1033,14 +1032,12 @@
         subject = CGIescape(subject, self.lang)
         author = CGIescape(author, self.lang)
-        datestr = CGIescape(datestr, self.lang)

         d = {
             'filename': urllib.quote(article.filename),
             'subject':  subject,
             'sequence': article.sequence,
-            'author':   author,
-            'datestr':  datestr
+            'author':   author
         print quick_maketext(
             'archidxentry.html', d,

--- archidxentry.html   2005-09-12 11:34:59.000000000 -0400
+++ /home/ryanczak/src/mailman-2.1.6/templates/en/archidxentry.html
2002-10-08 12:50:41.000000000 -0400
@@ -1,4 +1,4 @@
-<LI> %(datestr)s&nbsp;&nbsp;<A HREF="%(filename)s">%(subject)s
+<LI><A HREF="%(filename)s">%(subject)s
 </A><A NAME="%(sequence)i">&nbsp;</A>

More information about the Mailman-Users mailing list