Hi,
I have a list that majordomo archives and digest and am currently looking
to implement MHonArc. I was trying your script from the FAQ however. I
keep running into an error.
rogueserver:/var/lib/httpd/cgi-bin# ./mhonarc.pl
Unmatched right bracket at ./mhonarc.pl line 35, at end of line
syntax error at ./mhonarc.pl line 35, near "}"
Execution of ./mhonarc.pl aborted due to compilation errors.
I also had a question about the $ARCHDIR. I have my main directory that is
/usr/local/mail/archives and I put my archive directories in there IE
quake2.archive. Would I just put the main dir. meaning
/usr/local/mail/archives? Once I get the script working Do I have to
implement a cron job to continue to process the archives.
Is Mhonarc worth implementing with the majordomo. I just see at as an
easier way to access the archive logs?
Thanks for your time.
Joe Wronkowski
#!/usr/bin/perl
#
# mhonarch.pl - Process all Listprocessor archives using MHonArc
#
# Kevin McCann
#
#### Directory locations:
#
# Listproc, Majordomo, or Listserv top archives dir
$ARCHDIR = "/usr/local/mail/archives";
#
# MhonArch web archives directory
$MONDIR = "/var/lib/httpd/htdocs/majordomo/mhonarc";
#
#
# Let's figure out what lists exist
opendir(DIR,"$ARCHDIR/") || die "Can't open directory";@dirs = readdir(DIR);
@sorteddirs = sort @dirs;closedir(DIR);
for (@sorteddirs) { # processing a list $listname = $_;
opendir(DIR,"$ARCHDIR/$listname") || die "Can't open directory";
@logs = readdir(DIR);
@sortedlogs = sort @logs;
closedir(DIR);
for (@sortedlogs) {
if (/log/) { # processing files with name format 'logYYMM'
$log = $_;
system("/usr/local/bin/mhonarc -outdir $MONDIR/$listname/$log
$ARCHDIR/$listname/$log")
# modify the above command line as needed
}
}
}
} # end of script