mhonarc-users

Re: directory structure for large lists...

1998-08-20 10:53:09
   Now, I've gone through the archives (still wading through them, so
I may have missed something, of course), and I see references to wilma and
how it will provide an 'index.html' front end that divides things up by
month.  Great for the end-users looking at it, but, and unless I'm missing
something, this does nothing for the backend...we still have one great big
directory.

You can pre-/post-process the messages with something like procmail if
youi're on a UNIX system.  Here's your procmailrc file:

   HOME=/mnt/WWW/home/mhonarc
   UMASK=133
   LOGFILE=$HOME/logfile
   PATH=/bin:/usr/bin:/usr/local/bin
   VERBOSE=off

   DATE=`date +%b%y`

   # The brackets contain a tab and a space
   :0
   * ^From[    ]+\/[^    ]+
   { FROM = $MATCH }

   # archive all incoming messages to a single file
   :0 c:
   $HOME/incoming.archive

   # create a list-based lock (why should we have to call perl to find
   # out if a lock exists?), output to mhonarc
   :0w: $FROM.lock
   | $HOME/bin/mhonarc -add -umask 023 -rcfile rc -outdir 
/mnt/WWW/list/test/$DATE

   # if there was an error, send the message on to root
   :0
   ! root

Now, you can put this in your .procmailrc if procmail is your local
delivery agent, or you can call it via an alias or a .forward file.

alias:

   list-archive: "/usr/bin/procmail -m /mnt/WWW/home/mhonarc/.procmailrc"

.forward:

   "|IFS=' ' && p=/usr/bin/procmail && test -f $p && exec $p -Yf- ||
    exit 75 #YOUR_LOGIN_NAME"

There's all kinds of easy ways to do this.  For what it's worth, I'm
writing a book about procmail that covers this stuff in greater detail,
but the web-based archive chapter is still in a rewrite phase.

   The hard part, as I can see it, is to cross-link articles across
months/years, but I don't imagine the rest would be that hard...is it?  Or
is this already available and I'm just blind?

That's really hard.  The procmail method doesn't provide for that 
either, and neither does Wilma.

Chris

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