mhonarc-users

Is this right?

2000-01-20 11:12:07
I am trying to get MHonArc setup and would appreciate someone telling me if I
am on the right path.

As I understand it I need first to create an account on my server. Then I need
s directory to store the html files.  I install MHonArc and point it to the
account and the path for the html.

Since I want to sort my messages by month and year, I need to use another script
to process here's what I'm using:


#!/usr/bin/perl
# Edit above path to point to where perl is on your system.
#
# Wrapper for MHonArc to split mail archives into Year-Month directories

## Specify a package to protect variable names from MHonArc.
package Run_MHonArc;

## Get name of list and path to mail file being processed from command line

$list_name=$ARGV[0];
$mail_file=$ARGV[1];
if (!$list_name || !$mail_file)
        {
        print "usage: run_mhonarc.pl list_name full_mailfile_path\n";
        }
else

{

##       Edit to point at path to mhonarc
$MHonArc = "/revjoe-www/cgi-bin/mhonarc"; 

##       Edit to point at archive directory on your webserver
$archive_root = "/revjoe-www/archive";

##      Date stuff for directory name may need to be adjusted for your
##      local flavor of localtime

$month = ("January", "February", "March", "April", "May", "June", "July", 
"August",
"September", "October", "November", "December")[(localtime)[4]];
($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time);
$year += 1900; # Y2K proof - localtime returns 101 for the year 2001

##      Figure out output directory and create if it doesn't exist

$out_dir = "$archive_root/$list_name/$year-$month";
if ( ! -e $out_dir )
        {
        mkdir $out_dir, 0755 or die "Couldn't create $out_dir: $!\n";
        }

##      Define ARGV (ARGV is same across all packages).
##      Edit options as required/desired.

@args = ("-add",
         "-quiet",
         "-sort",
         "-reverse",
         "-outdir", "$out_dir",
         "$mail_file");

##      I use system() to fork MHonArc so I can return and unlink $mail_file


$result = system($MHonArc, @args);

##      Check to see if all went well before unlinking $mail_file

if ($result == 0) {
        unlink $mail_file;      
        }
}


I will use this script in the .forward file as:
run_mhonarc.pl youth_archive /revjoe-mail/youth

I will put the .forward file in the same directory as the users mail file?

Now as I understand it, this will update the database and add an html file every
time a mail is recieved?

Does this all sound right?

Also anyone have any idea how much disk space whould be allocated.  We are 
seeing
about 100 emails a day.
I'm thinking:
(100 emails * 1K/email) = 100K /Day
365 days * 100K/Day = 36,500 k /year + attachments

is my math right?

Thanks


joe hagerty

<Prev in Thread] Current Thread [Next in Thread>
  • Is this right?, joeh <=