Hi...
I've searched the archives for some brain dead simple way of bring in
old
digests so that MHonarc can use them, and couldn't find anything but some
references to procmail and -msgsep...nothing which seemed to work "easily"...
So, here is my contribution...a simple, brain dead script that takes a
Majordomo digest and converts it to a format that can be used by MHonarc...
I don't guarantee it, but if anyone can suggest what is wrong with it, I'd
like to know and try to fix it
Just run it as: <scriptname> <infile> > <outfile>
Marc G. Fournier
Systems Administrator @ hub.org
primary: scrappy(_at_)hub(_dot_)org secondary:
scrappy(_at_){freebsd|postgresql}.org
#!/usr/local/bin/perl
$userid = getlogin();
$ii = 0;
while (<>) {
if($printline) {
$line{$ii} = $_;
$ii++;
}
if
(/^----------------------------------------------------------------------/) {
$printline = 1;
$line{$ii} = "------------------------------";
$ii++;
}
}
for($jj = 0; $jj < $ii; $jj++) {
if(/^------------------------------/, $line{$jj}) {
if($line{$jj+2} =~ "^Date:") {
print "From $userid\n";
$jj += 2;
} else {
if($line{$jj+2} =~ "^End of") {
exit;
}
}
}
print $line{$jj};
}