c1b41d1a59c6c4be4a644725e0dcb3efa4b4f712
4 ################################################################################
5 # the RCFILE is the first arg
9 ################################################################################
10 # the list prefix is the second one
14 ################################################################################
17 my $spool = "/var/spool/platal/archives/";
18 my $tmpbox = "mytmpbox.mbox";
34 ################################################################################
44 ################################################################################
50 ## Do we start a new mail ?
52 if($line =~ /^From +[^@ ]*@[^@ ]* +[a-z]* +([a-z]*) +\d* +\d*:\d*:\d* +(\d*)$/i) {
53 if ($conv{$1} ne $m || $y ne $2) {
56 ## If we are here, then we just finished a month.
57 ## -> we close the file, and exec mhonarc on the stuff
60 $odir = $spool.$list."/$y/$m";
61 system("mkdir -p $odir") unless (-d
$odir);
62 system("mhonarc -add -outdir $odir -rcfile $rcfile $tmpbox");
70 open FILE
,"> $tmpbox";