#!/usr/bin/perl

 $rcfile   = "-rcfile ./message.rc";
 $tlevels  = "-tlevels 10";
 $idx1     = "-otherindexes ./daygroup.rc";
 $idx2     = "-otherindexes ./threads.rc";
 $idx3     = "-otherindexes ./author.rc";

 $mail     = "-nomailto";

 $options  = "$rcfile $tlevels $idx1 $idx2 $idx3";

 $mhonarc  = "/usr/bin/mhonarc";

 $base     = "";

open (LISTS, "./lists.txt");

while (<LISTS>) {
   chop;
   @field = split(/:/,$_);

   $name    = $field[0];
   $out     = $field[1];
   $title   = $field[2];

   $outdir  = "-outdir $out";
   $mailbox = "$name";
   $titles  = "-title \"$title\" -ttitle \"$title\"";
   $sysstr  = "$mhonarc $options $mail $outdir $mailbox $titles";
   print "$sysstr\n";
   system($sysstr);
}

close LISTS;

system("/home/mlists/bin/zapforum");
