Re: mhonarc.rmm.cgi

1998-08-19 13:12:00
[Courtesy CC to MHonArc list]

On August 18, 1998 at 09:40, Aumont - Comite Reseaux des Universites wrote:

The delete action will remove the original mail file and  run mhonarc -rmm,
but the mail number in the mail URL will change if I rebuilt the archive for 
som reason (for exemple because of ressources changes), this is not very
nice because it is important for user's to use mail's URLs as a unique
mail identifier. 

Use message-ids.  RMM accepts them, and MHonArc will make links of
them in messages if the id listed in is a message in the archive.

Users using URLs to message pages in messages is a known problem if
archive rebuilds are needed.

A possible hack (warning, this is off the top of my head) is to use
DEFINEDERIVED to create a file for each message where each filename is
the message-id of the message, and the content is the message number
(to refer back to message page).  Then, setup resources to always go
through a CGI program for all message navigational links, where the
message-id is passed to the CGI program.  Then the CGI program can just
do a open on the file with message-id as a name and read the info to
determine which page to pipe to the client.
(Note, the annotation facility of v2.3 can probably be abused to provide
 similiar functionality).

Ideally, MHonArc should have direct support for message-ids for
message filenames.  Unfortunately, such a change affects multiple
locations in the code (a limitation of design where message-ids were
not a key thing when MHonArc was initially developed (and called by
another name)).

Hmmm ... If I recall (source code is at home, so I cannot verify
at this time), you maybe able to bypass something like DEFINEDERIVED
in v2.3.  With v2.3, you can have a CGI program that loads the
mhonarc database file to the mapping from message-id to message number.
The drawback is the overhead of reading the database file each time.

A DB_File type approach would be better and provide better performance
for CGI programs.  DB_File (or something similiar) could be hooked
into the code for mapping message-ids to message page filenames.  It
is something I plan to look into, and would be better for CGI based
access to archives.

Is there a way to reserve a mail number so it will never
be use by mhonarc for another mail ?

Not with code changes.  Plus, reservation does not mean much if
you recreate an archive from scratch.  It can get complicated.


             Earl Hood              | University of California: Irvine
      ehood(_at_)medusa(_dot_)acs(_dot_)uci(_dot_)edu      |      Electronic 
Loiterer | Dabbler of SGML/WWW/Perl/MIME

<Prev in Thread] Current Thread [Next in Thread>