[Mailman-Users] post_id in messages and archives

Steve Huston huston at astro.Princeton.EDU
Fri Jan 24 19:37:19 CET 2003

In trying to migrate some old mailing lists to Mailman on our new server, one
thing was mentioned to me.  The old list software kept track of messages by a
unique sequential number (first message is 1, second is 2, etc).  This was
mostly done for the archives of the list, but apparently the list users have
grown accustomed to referring to messages by their number, since it is also
mentioned in the footer of the mail ("This is message number 2348 in the

Checking the patches on Sourceforge, I found where someone sent in a patch
that adds the mlist.post_id number to the subject if it contains '%d'.  While
this may be the easiest way to do this, since it would also be searchable that
way in the archives, I'd prefer to keep the information in the footer and/or
message headers.

So far, I have patched the Digest.py code and Decorate.py to make available
"post_id" as a variable in the footer (though it's not really pertinent in
digests, and I don't know what'll happen if it shows up in one, but I can't
use it in PERSONALIZED_ALLOWEDS in NonDigest.py since the list doesn't need
personalization or the overhead of processing it that way), and an X-Post-ID
header in CookHeaders.py, and though I haven't tested the header part yet
everything seems to work fine.

My two questions:

1) Where would I go about adding a config option to set the post_id?  Ideally
this is something which should only be set once, since you don't want someone
mucking about with the number, and if you know there's 2850 messages in the
old archive it's safe to make this one 3000 for those that might come in while
you're migrating, and not worry about repeating numbers.  So I would think it
would be somewhere when creating the list you'd want to do this; or, an option
that only allows inflation of the number (new_post_id > post_id || error).

2) How do I get this information to pass into the archives?  The headers seem
to be stripped somewhere, and footers are not archived.  I'd like people to be
able to search for the number and find that article.  This could even be
pretty-printed from the header, so instead of "X-Post-ID: 1234" it would say
somewhere "This is article # 1234".  Since the search engine is ht://Dig, it
would pick it up either way; I imagine it could even be in the html source and
not displayed (META tag?) and htdig would get it, but I'd rather it be
viewable somehow.

If/when I get this nicely cleaned up and presentable I'll submit the patch to

Steve Huston - Unix Systems Administrator, Dept. of Astrophysical Sciences
 Princeton University  |     ICBM Address: 40.346525   -74.651285
   126 Peyton Hall     |"On my ship, the Rocinante, wheeling through
 Princeton, NJ   08544 | the galaxies; headed for the heart of Cygnus,
   (609) 258-7375      | headlong into mystery."  -Rush, 'Cygnus X-1'

More information about the Mailman-Users mailing list