> I'm running Majordomo and qmail together and I'm looking for a nice way to
> publish my list archives on the web.
> 
> I can get MHonarc to add them to an archive as they arrive, but as far as
> I can see this will put all mail for the list into one huge archive.
> Alternatively I could run MHonArc on a Majordomo archive of the format
> list.YYYYMM, but I have heard that Majordomo archives do not always
> contain all the information MHonArc can use to thread articles properly.
> 
> Can anyone give me some hints on how they have used MHonArc to provide a
> web gateway to their Majordomo lists?

I preprocess via a procmail filter -- you can pump mail directly into procmail
via your aliases file, or create an account that calls it through a .forward
file (I'm guessing this works the same way as sendmail).

Here's a quick and easy .procmailrc to do it (replace TAB with actual tab
character):

   PATH=/bin:/usr/bin:/usr/local/bin
   UMASK=133
   SHELL=/bin/sh
   DATE=`date +%b%y`
   BACKUPARCHIVE="$DATE/backup.mbox"

   # If people don't want to be archived, then remove their
   # message
   :0
   * ^(X-no-archive: yes|Restrict: no-external-archive)
   /dev/null

   # Save a backup of all incoming mail
   :0:
   $BACKUPARCHIVE

   # Note the lock -- why not let procmail do the locking instead
   # of the overhead of Perl and MHonArc to do the checking?
   :0:
   | mhonarc -add -umask 023 -outdir /mnt/WWW/htdocs/lists/$DATE

There's a lot more that you can do, but this is simple enough to get
the job done.  Untested, but I think it'll work.

Chris

Reply via email to