[Mailman-Users] Approve subscription requests via mail

Stephen J. Turnbull turnbull at sk.tsukuba.ac.jp
Mon Nov 20 04:11:28 CET 2006


Barry Warsaw writes:

 > What he said!  It sucks that bin/arch is not reproducible, but that's  
 > something I'd like to address in a future release.  The trick will be  
 > to see if we can provide a reliable mapping from the old urls to  
 > whatever new url scheme we choose.

Just use the message's message id, munged into URI-compatibility if
necessary.  That will make it almost trivially searchable and easy to
verify that you've probably got the right message.  When rebuilding an
archive you just grovel through the old archive and build a table mapping
old URLs to new.

Note that because of irreproducibility if you don't have the old
archive you're stuck anyway.

Specifically, on inserting into the archive

1.  check for an existing directory with that name.  If it exists,
somebody has a problem generating unique message IDs, and they can
suffer for it with a layer of indirection.  Put the message in there
with the name being an index number (order of insertion is easy, or
you could MD5 or SHA1 the message body for a more unique and
reproducible identity---NB, you can truncate the hash for a manageable
number of bytes and slightly less double-collision resistance).
Update index.html in that directory.  Go to DONE.

2.  check for an existing file with that name.  If it exists,
"somebody has a problem ...".  mv the file to a temporary locationn,
create the directory with that name, mv the existing file in there,
add the new one (see #1 for naming options).  Create index.html.  Go
to DONE.

3.  create the file.

DONE:  You're done!

Note that because the collision directory and the file have the same
name, third parties can easily construct the appropriate URL and get
something quite useful in the case of a collision.

This scheme also has the advantage that you can predict the URL having
only a copy of the message.  So you could put the full URL of the
current message in the List-Archive header (if that doesn't contravene
the RFC), or you could add an X-List-Archive-Current-Post-URL header.



More information about the Mailman-Users mailing list