[Mailman-Developers] Hacking pipermail...

Brad Knowles brad at stop.mail-abuse.org
Fri Feb 4 19:10:08 CET 2005


Folks,

	I've just had to rebuild an archive for a list, thus causing 
pipermail to regenerate message numbers and breaking all the links 
that previously used to work.  I'd like to try to figure out a way to 
avoid that problem.

	Looking at pipermail.py in processUnixMailbox, around lines 
565-568, the critical code appears to be:

             msgid = m.get('message-id', 'n/a')
             self.message(_('#%(counter)05d %(msgid)s'))
             a = self._makeArticle(m, self.sequence)
             self.sequence += 1

	Am I missing something here?  Could we simply rip out the 
references to "self.sequence" and instead drop in a call to "md5(m)"? 
Of course, we'd also have to adjust the initialization of "sequence" 
to be the empty string and make sure that all other references to it 
are as a string instead of a number, but I don't think that would be 
too hard.

	Certainly, it seems that this would be an easy way to avoid 
having to break all existing links because the sequence number 
arbitrarily changed when the archive was regenerated.


	Or does Python not have an internal implementation of MD5, or 
even a shim to a library function that does MD5?

-- 
Brad Knowles, <brad at stop.mail-abuse.org>

"Those who would give up essential Liberty, to purchase a little
temporary Safety, deserve neither Liberty nor Safety."

     -- Benjamin Franklin (1706-1790), reply of the Pennsylvania
     Assembly to the Governor, November 11, 1755

   SAGE member since 1995.  See <http://www.sage.org/> for more info.


More information about the Mailman-Developers mailing list