I use procmail to invoke a perl script each time a message is posted to
my mailing list:
:0 c
* ^Reply-To: marxism(_at_)lists(_dot_)panix(_dot_)com
|perl5 /users/lnp3/.procmail/webnewmail.pl
====
The perl script, as follows, invokes the mhonarc command and also keeps
track of when the month has changed. If the month changes, it creates a
new directory and funnels converted html messages to that destination.
#!/usr/local/bin/perl
## Specify a package to protect names from MHonArc.
package WebNewMail;
$date = `date`;
@date_tbl = split(" ", $date);
$day = @date_tbl[0];
$month = @date_tbl[1];
$year = @date_tbl[5];
$return = `ls /users/lnp3/public_html/archives/`;
if ($return !~ /$month$year/)
{`mkdir /users/lnp3/public_html/archives/$month$year`;
`chmod a+x /users/lnp3/public_html/archives/$month$year`;}
## Edit to point to installed mhonarc.
$MHonArc = "/usr/local/bin/mhonarc";
## Define ARGV (ARGV is same across all packages).
## Edit options as required/desired.
@ARGV = ("-add",
"-quiet",
"-outdir", "/users/lnp3/public_html/archives/$month$year",
"-rcfile", "/users/lnp3/public_html/archives/main.rc");
## Just require mhonarc, this prevents the overhead of a
## fork/exec.
require $MHonArc;
I have also used the following resource files to great advantage. They
create date, thread and author indexes. With minor changes, they are the
ones that are found at http://www.sonic.net/~snevel/mhonarc.html, the
website of Simeon Nevel who was of tremendous help when I first got
started. Speaking as somebody who has worked with both Hypermail and
Mhonarc, I can say that Mhonarc is the greatest thing since sliced bread
and Earl Hood is to be commended for developing such a terrific
product.
Main.rc:
75
/users/lnp3/public_html/archives/author.rc
%b %d, %Y
Date
From
Subject
033
date1.html
date
$IDXTITLE$
Marxism Archive Index (by Author)
[< Prev Page]
[Next Page >]
$FROMNAME$, $FROMADDR$
$SUBJECT$, $MSGGMTDATE$