mhonarc-commits
[Top] [All Lists]

CVS: mharc/bin filter-spool,1.6,1.7 mk-procmailrc,1.14,1.15 read-mail,1.7,1...

2002-07-22 21:00:49
Update of /cvsroot/mhonarc/mharc/bin
In directory subversions:/tmp/cvs-serv26349/bin

Modified Files:
	filter-spool mk-procmailrc read-mail web-archive 
Log Message:
* bin/mk-procmailrc
  . Added -out option that can be used to specify the name of
    the procmailrc file to generate.  If not specified, the PROCMAILRC
    variable in lib/config.sh is used.  Otherwise, the default value is
    "$SW_ROOT/procmailrc.mharc";

    IMPORTANT NOTE: This implies that the name of the main procmailrc
		    used by mharc has changed from
		    $SW_ROOT/.procmailrc.  This is to avoid potential
		    conflict with environments that use Procmail as a
		    local delivery agent and MHArc has been extracted
		    in the home directory of the archiving account.

		    If upgrading, all you should have to do is
		    invoke "make" to create the procmailrc with
		    the newer filename.  Then, you can remove the
		    old .procmailrc.

* cgi-bin/extract-mesg.cgi.in.dist:
  . NEW: CGI program to extract original raw message.  It is intended
    to be used in HTML archive message pages to allow the reader to
    retrieve the original mail message.

    The file lib/common.mrc.in.dist has been modified to include
    an "[Original]" link on messages pages.  If you would like this
    feature in an existing mharc archive, you will need to edit
    your lib/common.mrc.in an add the link.  Here is the resource
    setting added to lib/common.mrc.in.dist:

    <TopLinks>
    <hr>
    $BUTTON(PREV)$$BUTTON(NEXT)$$BUTTON(TPREV)$$BUTTON(TNEXT)$[<a
    href="$IDXFNAME$#$MSGNUM$">Date Index</a>][<a
    href="$TIDXFNAME$#$MSGNUM$">Thread Index</a>][<a
    href="$EXTRACT-CGI$?a=$LIST-NAME:U$&amp;m=$CUR-PERIOD$&amp;i=$MSGID:U$"
    >Original</a>]
    </TopLinks>

* lib/config.sh.dist:
  . Added EXTRACT_CGI variable that represents URL to extract-mesg.cgi.
  . Added PROCMAILRC variable to define main procmailrc file used
    by bin/mk-procmailrc and bin/filter-spool.
  . Added ORGMAIL_LOCK_TIMEOUT to set lock timeout used by filter-spool.
  . Added LOG_DIR variable to represent location to place log files.

* etc/apache.conf.in.dist, etc/.htaccess.conf.in.dist:
  . Added denial of files starting with "procmail".

* bin/web-archive:
  . Updated to defined $EXTRACT-CGI$ resource variable.

* bin/filter-spool:
  . Rewritten in Perl.  Run program with -man option to view manpage.

* bin/read-mail:
  . Rewritten in Perl.  Run program with -man option to view manpage.


Index: filter-spool
===================================================================
RCS file: /cvsroot/mhonarc/mharc/bin/filter-spool,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -r1.6 -r1.7
*** filter-spool	12 Mar 2002 22:30:26 -0000	1.6
--- filter-spool	23 Jul 2002 04:00:21 -0000	1.7
***************
*** 1,3 ****
! #!/bin/sh
  ##---------------------------------------------------------------------------##
  ##  File:
--- 1,3 ----
! #!/usr/local/bin/perl
  ##---------------------------------------------------------------------------##
  ##  File:
***************
*** 6,11 ****
  ##	Script to grab mail spool and filter mail to raw mbox archives.
  ##---------------------------------------------------------------------------##
! ##  Copyright (C) 2001-2002	Earl Hood <earl(_at_)earlhood(_dot_)com>
! ##  Script derived from example provided in the Procmail documention.
  ##
  ##  This program is free software; you can redistribute it and/or modify
--- 6,10 ----
  ##	Script to grab mail spool and filter mail to raw mbox archives.
  ##---------------------------------------------------------------------------##
! ##  Copyright (C) 2002	Earl Hood <earl(_at_)earlhood(_dot_)com>
  ##
  ##  This program is free software; you can redistribute it and/or modify
***************
*** 25,77 ****
  ##---------------------------------------------------------------------------##
  
! PATH=$HOME/bin:/usr/local/bin:/usr/bin:/bin; export PATH
! BASEDIR=`dirname $0`
! archiveroot_rel=$BASEDIR/..
! 
! # Verify root of installation
! ARCHIVEROOT=`cd $archiveroot_rel && pwd`
! if [ "X$ARCHIVEROOT" = "X" ]; then
!   echo "Cannot determine archive root!"
!   exit 1;
! fi
! if [ ! -d $ARCHIVEROOT ]; then
!   echo "$ARCHIVEROOT is not a directory!"
!   exit 1;
! fi
! 
! # Load configuration
! . $ARCHIVEROOT/lib/config.sh
! 
! # Make sure umask is set to make things readable by default
! umask 022
! 
! # Make sure certain directories exist
! mkdir -p $ARCHIVEROOT/mbox
! mkdir -p $ARCHIVEROOT/html
! mkdir -p $ARCHIVEROOT/log
! 
! # Process mail spool
! if cd $ARCHIVEROOT &&
!  test -s $ORGMAIL &&
!  lockfile -r0 -l1024 .newmail.lock 2>/dev/null
! then
!   trap "rm -f .newmail.lock" 1 2 3 13 15
!   if [ "$IS_MAIL_SPOOL" = "1" ]; then
!     lockfile -l1024 -ml
!   else
!     lockfile -l1024 $ORGMAIL.lock
!   fi
!   /bin/cat $ORGMAIL >>.newmail &&
!       /bin/cat /dev/null >$ORGMAIL
!   if [ "$IS_MAIL_SPOOL" = "1" ]; then
!     lockfile -mu
!   else
!     /bin/rm -f $ORGMAIL.lock
!   fi
!   formail -s procmail $ARCHIVEROOT/.procmailrc $PROCMAILVARS <.newmail && \
!       /bin/rm -f .newmail
!   /bin/rm -f .newmail.lock
!   exit 0
! else
!   exit 1
! fi
--- 24,292 ----
  ##---------------------------------------------------------------------------##
  
! package MHArc::filter_spool;
! 
! ##---------------------------------------------------------------------------##
! # <boot-strap>
! my $Dir;
! BEGIN {
!   $Dir = `dirname $0`; chomp $Dir;
! }
! use lib "$Dir/../lib";  # Add relative lib to search path
! use MHArc::Config;
! my $config = MHArc::Config->load("$Dir/../lib/config.sh");
! # </boot-strap>
! ##---------------------------------------------------------------------------##
! 
! use Getopt::Long;
! use MHArc::Util qw( cmd run_prg usage );
! 
! my @_term_sigs  = qw(
!     ABRT ALRM BUS FPE HUP ILL INT IOT PIPE POLL PROF QUIT SEGV
!     TERM TRAP USR1 USR2 VTALRM XCPU XFSZ
! );
! 
! MAIN: {
!   # Make sure umask is set to make things readable by default
!   umask 022;
! 
!   # Grap command-line options
!   my %opt = ( );
!   my $clstatus = GetOptions(\%opt,
!     'verbose!',
!     'home=s',
!     'html-dir=s',
!     'is-spool!',
!     'log-dir=s',
!     'lock-timeout=i',
!     'mail=s',
!     'mbox-dir=s',
!     'procmailrc=s',
!     'procmailvars=s',
! 
!     'help',
!     'man',
!   );
!   usage(0) unless $clstatus;
!   usage(1) if $opt{'help'};
!   usage(2) if $opt{'man'};
! 
!   my $verbose = $opt{'verbose'};
!   if ($verbose) {
!     $MHArc::Util::ECHO_CMDS = 1;
!   }
! 
!   my $home		= $opt{'home'} ||
! 				$config->{'SW_ROOT'} ||
! 				"$Dir/..";
!   my $html_dir		= $opt{'html-dir'} ||
! 				$config->{'HTML_DIR'} ||
! 				join('/', $home, 'html');
!   my $log_dir		= $opt{'log-dir'} ||
! 				$config->{'LOG_DIR'} ||
! 				join('/', $home, 'log');
!   my $mbox_dir		= $opt{'mbox-dir'} ||
! 				$config->{'MBOX_DIR'} ||
! 				join('/', $home, 'mbox');
!   my $procmailrc	= $opt{'procmailrc'} ||
! 				$config->{'PROCMAILRC'} ||
! 				join('/', $home, 'procmailrc.mharc');
!   my $procmailvars	= $opt{'procmailvars'} ||
! 				$config->{'PROCMAILVARS'} ||
! 				"";
!   my $mail		= $opt{'mail'} ||
! 				$config->{'ORGMAIL'} ||
! 				join('/', '/var/mail', $ENV{'LOGNAME'});
!   my $is_spool		= $opt{'is-spool'} ||
! 				$config->{'IS_MAIL_SPOOL'} ||
! 				1;
!   my $lock_to   	= $opt{'lock-timeout'} ||
! 				$config->{'ORGMAIL_LOCK_TIMEOUT'} ||
! 				3600;
! 
!   die qq/ERROR: "$home" not a directory/
!       if (! -d $home);
!   die qq/ERROR: Unable to change directory to "$home": $!/
!       unless chdir($home);
! 
!   # Make sure certain directories exist
!   cmd('mkdir', '-p', $log_dir, $mbox_dir, $html_dir);
! 
!   # Check that we have data to process
!   if ((! -e $mail) || ((stat($mail))[7] == 0)) {
!     print qq/"$mail" does not exist or is zero bytes/  if $verbose;
!     exit 1;
!   }
! 
!   if (cmd("lockfile -r5 -l$lock_to .newmail.lock 2>/dev/null") != 0) {
!     print qq/Unable to obtain lock, exiting/  if $verbose;
!     exit 1;
!   }
! 
!   eval {
!     local @SIG{(_at_)_term_sigs} = (\&clean_lock) x scalar(@_term_sigs);
!     if ($is_spool) {
!       run_prg('lockfile', "-l$lock_to", '-ml');
!     } else {
!       run_prg('lockfile', "-l$lock_to", "$mail.lock");
!     }
!     if (cmd("/bin/cat '$mail' >>.newmail") == 0) {
!       cmd("/bin/cat /dev/null >'$mail'");
!     }
!     if ($is_spool) {
!       cmd('lockfile', '-mu');
!     } else {
!       unlink("$mail.lock") ||
! 	  warn qq/Warning: Unable to remove "$mail.lock": $!\n/;
!     }
! 
!     if (cmd("formail -s procmail $procmailrc $procmailvars <.newmail") == 0) {
!       unlink('.newmail') ||
! 	  warn qq/Warning: Unable to remove ".newmail"\n/;
!     }
!   };
!   clean_lock();
!   if ($@) {
!     die $@, "\n";
!   }
! 
! } # End: MAIN
! 
! ##---------------------------------------------------------------------------##
! 
! sub clean_lock {
!   unlink('.newmail.lock');
! }
! 
! ##---------------------------------------------------------------------------##
! __END__
! 
! =head1 NAME
! 
! filter-spool - Filter incoming mail into raw archives
! 
! =head1 SYNOPSIS
! 
!   filter-spool
!   filter-spool [options]
! 
! =head1 DESCRIPTION
! 
! This program is part of MHArc, a web-based mail archiving system.
! This program has the responsibility of filtering incoming mail into
! the raw message archives.  This script is called by the C<read-mail>
! script before C<web-archive> is invoked.
! 
! =head1 OPTIONS
! 
! This program is generally called without any command-line options
! since it will read C<I<mharc-root>/lib/config.sh> for all configurable
! options.  Regardless, the following command-line options are
! available:
! 
! =over
! 
! =item C<-help>
! 
! Print out usage information.
! 
! =item C<-home> I<pathname>
! 
! Root pathname of archiving software and data.  If not specified,
! C<SW_ROOT> variable in C<config.sh> is used, else the parent directory
! that contains this program is used.
! 
! =item C<-html-dir> I<pathname>
! 
! Root pathname containing HTML archives.  If not specified,
! C<MBOX_DIR> variable in C<config.sh> is used, else C<I<-home>/html>
! is used.
! 
! B<Note:> This program does not do any processing of the HTML archives.
! This option is used to insure that the HTML archive root directory
! exists for subsequent processing by other MHArc scripts.
! 
! =item C<-is-spool>
! 
! Specifies that C<-mail> represents a mail spool file.  If not
! specified, the value of the C<IS_MAIL_SPOOL> variable in C<config.sh>
! is used, else C<-mail> is assumed to be a mail spool file.
! 
! =item C<-lock-timeout> I<seconds>
! 
! The age of a lock before it is forceably removed.  This is used
! to help deal with stale locks.
! 
! If this option is not specified, C<ORGMAIL_LOCK_TIMEOUT> variable in
! C<config.sh> is used, else C<3600> is used.
! 
! =item C<-log-dir> I<pathname>
! 
! Root pathname to place log files.  If not specified,
! C<LOG_DIR> variable in C<config.sh> is used, else C<I<-home>/log>
! is used.
! 
! =item C<-mail> I<pathname>
! 
! Pathname to incoming mailbox file.
! If not specified, C<ORGMAIL> variable in C<config.sh> is used,
! else C</var/mail/$LOGNAME> is used (C<$LOGNAME> represents the
! value of the C<LOGNAME> environment variable.
! 
! =item C<-man>
! 
! Print out entire manpage.
! 
! =item C<-mbox-dir> I<pathname>
! 
! Root pathname containing raw mailbox archives.  If not specified,
! C<MBOX_DIR> variable in C<config.sh> is used, else C<I<-home>/mbox>
! is used.
! 
! =item C<-procmailrc> I<pathname>
! 
! Pathname to procmailrc file to use when filtering mail.
! If not specified, C<PROCMAILRC> variable in C<config.sh> is used,
! else C<I<-home>/procmailrc.mharc> is used.
! 
! =item C<-procmailvars> I<variable-list>
! 
! Additional variables to pass into C<procmail>.
! If not specified, C<PROCMAILVARS> variable in C<config.sh> is used.
! 
! =item C<-verbose>
! 
! Print out status messages.
! 
! =back
! 
! =head1 EXIT VALUES
! 
! If there was mail to process, and no errors occurred during processing,
! a zero exit status will be returned.  Otherwise, a non-zero exit status
! will be returned.
! 
! =head1 FILES
! 
! =over
! 
! =item C<I<mharc-root>/lib/config.sh>
! 
! Main configuration file for MHArc.
! 
! =back
! 
! =head1 VERSION
! 
! $Id$
! 
! =head1 AUTHOR
! 
! Earl Hood, earl(_at_)earlhood(_dot_)com
! 
! This program is part of the MHArc archiving system and comes with
! ABSOLUTELY NO WARRANTY and may be copied only under the terms of
! the GNU General Public License, which may be found in the MHArc
! distribution.
! 
! =cut
! 

Index: mk-procmailrc
===================================================================
RCS file: /cvsroot/mhonarc/mharc/bin/mk-procmailrc,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -r1.14 -r1.15
*** mk-procmailrc	20 Jul 2002 04:04:57 -0000	1.14
--- mk-procmailrc	23 Jul 2002 04:00:21 -0000	1.15
***************
*** 49,54 ****
--- 49,56 ----
      'mbox-dir=s',
      'msgid-cache-size=i',
+     'out=s',
      'procmail-path=s',
  
+     'verbose!',
      'help',
      'man'
***************
*** 64,67 ****
--- 66,72 ----
  		      $config->{'MBOX_DIR'} ||
  		      join('/',$basedir,'mbox');
+   my $out_file      = $opt{'out'} ||
+ 		      $config->{'PROCMAILRC'} ||
+ 		      join('/', $basedir, 'procmailrc.mharc');
    my $procmail_path = $opt{'procmail-path'} ||
  		      $config->{'PROCMAIL_PATH'};
***************
*** 79,90 ****
    my $file = shift(@ARGV) ||
  	     $config->{'LISTS_DEF_FILE'} ||
! 	     "$Dir/../lib/lists.def";
    my $listdef = MHArc::ListDef->new($file);
  
!   my $extract_date_prg =
!       join('/', $config->{'SW_ROOT'}, 'bin', 'extract-mesg-date');
  
    ## Print procmailrc header
!   print <<EOT;
  ##======================================================================
  ##	!!AUTO-CREATED, DO NOT EDIT!!
--- 84,104 ----
    my $file = shift(@ARGV) ||
  	     $config->{'LISTS_DEF_FILE'} ||
! 	     "$basedir/lib/lists.def";
    my $listdef = MHArc::ListDef->new($file);
  
!   my $extract_date_prg = join('/', $basedir, 'bin', 'extract-mesg-date');
! 
!   local(*OUTFILE);
!   my $outfh;
!   if (!defined($out_file) || ($out_file eq "") || ($out_file eq '-')) {
!     $outfh = \*STDOUT;
!   } else {
!     open(OUTFILE, ">$out_file") ||
! 	die qq/ERROR: Unable to create "$out_file": $!\n/;
!     $outfh = \*OUTFILE;
!   }
  
    ## Print procmailrc header
!   print $outfh <<EOT;
  ##======================================================================
  ##	!!AUTO-CREATED, DO NOT EDIT!!
***************
*** 205,209 ****
        $cvs_prefix = $listdef->{$name}{'cvs-subject-prefix'}[0] || 'CVS commit';
        foreach $addr (@addr) {
! 	print <<EOT;
  ## $name (CVS)
  :0
--- 219,223 ----
        $cvs_prefix = $listdef->{$name}{'cvs-subject-prefix'}[0] || 'CVS commit';
        foreach $addr (@addr) {
! 	print $outfh <<EOT;
  ## $name (CVS)
  :0
***************
*** 226,230 ****
  
      # address receipe
!     print <<EOT;
  ## $name
  :0
--- 240,244 ----
  
      # address receipe
!     print $outfh <<EOT;
  ## $name
  :0
***************
*** 248,252 ****
  
    if (!$nocatch) {
!     print <<EOT;
  ##======================================================================
  ##	No Matches
--- 262,266 ----
  
    if (!$nocatch) {
!     print $outfh <<EOT;
  ##======================================================================
  ##	No Matches
***************
*** 269,273 ****
    }
  
!   print <<'EOT';
  ##======================================================================
  ##	Discard message at the end
--- 283,287 ----
    }
  
!   print $outfh <<'EOT';
  ##======================================================================
  ##	Discard message at the end
***************
*** 277,280 ****
--- 291,298 ----
  EOT
  
+   if ($outfh != \*STDOUT) {
+     close($outfh);
+   }
+ 
  } # End: MAIN
  
***************
*** 283,287 ****
  =head1 NAME
  
! mk-procmailrc - Generate .procmailrc from lists.def
  
  =head1 SYNOPSIS
--- 301,305 ----
  =head1 NAME
  
! mk-procmailrc - Generate procmailrc from lists.def
  
  =head1 SYNOPSIS
***************
*** 292,300 ****
  =head1 DESCRIPTION
  
! This program is part of MHArc, the auto-archiving system that works in
! conjuction with Procmail, Namazu, and a collection of shell and
! Perl programs.  This program has the responsibility of generating
! the main C<.procmailrc> used by the C<filter-spool> program.  The
! C<.procmailrc> is generated from C<I<mharc-root>/lib/lists.def>.
  
  This program is typically invoked from calling C<make> from
--- 310,317 ----
  =head1 DESCRIPTION
  
! This program is part of MHArc, a web-based mail archiving system.  This
! program has the responsibility of generating the main procmailrc
! used by the C<filter-spool> program.  The procmailrc is generated
! from C<I<mharc-root>/lib/lists.def>.
  
  This program is typically invoked from calling C<make> from
***************
*** 305,312 ****
  
  The list definition file, C<I<mharc-root>/lib/lists.def>, is
! read to generate the C<.procmailrc> used by B<filter-spool> to
  filter messages into raw mail archives.  The format of the file
  is intended to be simple and more convenient than writing the
! C<.procmailrc> file yourself.
  
  The basic format of the file is as follows:
--- 322,329 ----
  
  The list definition file, C<I<mharc-root>/lib/lists.def>, is
! read to generate the procmailrc used by B<filter-spool> to
  filter messages into raw mail archives.  The format of the file
  is intended to be simple and more convenient than writing the
! procmailrc file yourself.
  
  The basic format of the file is as follows:
***************
*** 520,528 ****
  in C<config.sh> is used, else 16384 will be used.
  
  =item C<-procmail-path> I<pathname-list>
  
  The search path to be used by procmail.  I.e. The value to give
! the C<PATH> variable in the C<.procmailrc>.  If this option is
! not specified, the C<PROCMAIL_PATH> variable in C<config.sh>.
  
  =back
--- 537,554 ----
  in C<config.sh> is used, else 16384 will be used.
  
+ =item C<-out> I<pathname>
+ 
+ Output filename.  If this option is not specified, the C<PROCMAILRC>
+ variable in C<config.sh> is used, else C<I<-home>/procmailrc.mharc>
+ is used.
+ 
+ If "-" is the I<pathname>, then the procmailrc will be dumped to
+ standard out.
+ 
  =item C<-procmail-path> I<pathname-list>
  
  The search path to be used by procmail.  I.e. The value to give
! the C<PATH> variable in the procmailrc.  If this option is
! not specified, the C<PROCMAIL_PATH> variable in C<config.sh> is used.
  
  =back
***************
*** 539,546 ****
  
  Main configuration file for MHArc.
- 
- =item C<I<mharc-root>/.procmailrc>
- 
- Procmail resource file generated by this program.
  
  =back
--- 565,568 ----

Index: read-mail
===================================================================
RCS file: /cvsroot/mhonarc/mharc/bin/read-mail,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -r1.7 -r1.8
*** read-mail	23 May 2002 01:21:53 -0000	1.7
--- read-mail	23 Jul 2002 04:00:21 -0000	1.8
***************
*** 1,3 ****
! #!/bin/sh
  ##---------------------------------------------------------------------------##
  ##  File:
--- 1,3 ----
! #!/usr/local/bin/perl
  ##---------------------------------------------------------------------------##
  ##  File:
***************
*** 24,38 ****
  ##---------------------------------------------------------------------------##
  
! PATH=$HOME/bin:/usr/local/bin:$PATH; export PATH
! BASEDIR=`dirname $0`
! if [ -f $BASEDIR/.env.sh ]; then
!   . $BASEDIR/.env.sh
! fi
! 
! # Do nothing if .noarchive exists
! ARCHIVEROOT=$BASEDIR/..
! if [ ! -f $ARCHIVEROOT/.noarchive ]; then
!   cd $ARCHIVEROOT
!   bin/filter-spool && bin/web-archive
! fi
! exit 0
--- 24,164 ----
  ##---------------------------------------------------------------------------##
  
! package MHArc::read_mail;
! 
! ##---------------------------------------------------------------------------##
! # <boot-strap>
! my $Dir;
! BEGIN {
!   $Dir = `dirname $0`; chomp $Dir;
! }
! use lib "$Dir/../lib";  # Add relative lib to search path
! use MHArc::Config;
! my $config = MHArc::Config->load("$Dir/../lib/config.sh");
! # </boot-strap>
! ##---------------------------------------------------------------------------##
! 
! use Getopt::Long;
! use MHArc::Util qw( ch_dir cmd usage );
! 
! MAIN: {
!   # Grap command-line options
!   my %opt = ( );
!   my $clstatus = GetOptions(\%opt,
!     'force!',
!     'home=s',
!     'verbose!',
! 
!     'help',
!     'man',
!   );
!   usage(0) unless $clstatus;
!   usage(1) if $opt{'help'};
!   usage(2) if $opt{'man'};
! 
!   my $verbose = $opt{'verbose'};
!   if ($verbose) {
!     $MHArc::Util::ECHO_CMDS = 1;
!   }
! 
!   my $home = $opt{'home'} ||
! 		$config->{'SW_ROOT'} ||
! 		"$Dir/..";
!   my $force = $opt{'force'};
! 
!   ch_dir($home) ||
!       die qq/ERROR: Unable to change directory to "$home": $!\n/;
! 
!   if (-e '.noarchive') {
!     print "Archiving is currently disabled\n"  if $verbose;
!     if (!$force) {
!       exit 0;
!     }
!     print "However, -force specified, so continuing...\n"  if $verbose;
!   }
! 
!   my @cmd_args = ();
!   push(@cmd_args, '-verbose')  if $verbose;
!   if (cmd('./bin/filter-spool', @cmd_args) == 0) {
!     cmd('./bin/web-archive', @cmd_args);
!   }
! }
! 
! ##---------------------------------------------------------------------------##
! __END__
! 
! =head1 NAME
! 
! read-mail - Archive incoming mail
! 
! =head1 SYNOPSIS
! 
!   read-mail
!   read-mail [options]
! 
! =head1 DESCRIPTION
! 
! This program is part of MHArc, a web-based mail archiving system.
! This is the main program for archiving mail.  It is generally
! called via cron.
! 
! This program does very little itself, but it invokes other
! MHArc scripts to do all the work.
! 
! If the file C<.noarchive> exists in MHArc root directory, then
! this program will do nothing and exit.  This is to allow one
! to disable archiving while doing administrative tasks.
! 
! =head1 OPTIONS
! 
! This program is generally called without any command-line options
! since it will read C<I<mharc-root>/lib/config.sh> for any configurable
! options.  Regardless, the following command-line options are
! available:
! 
! =over
! 
! =item C<-help>
! 
! Print out usage information.
! 
! =item C<-home> I<pathname>
! 
! Root pathname of archiving software and data.  If not specified,
! C<SW_ROOT> variable in C<config.sh> is used, else the parent directory
! that contains this program is used.
! 
! =item C<-man>
! 
! Print out entire manpage.
! 
! =item C<-verbose>
! 
! Print out status messages.
! 
! =back
! 
! =head1 FILES
! 
! =over
! 
! =item C<I<mharc-root>/lib/config.sh>
! 
! Main configuration file for MHArc.
! 
! =back
! 
! =head1 VERSION
! 
! $Id$
! 
! =head1 AUTHOR
! 
! Earl Hood, earl(_at_)earlhood(_dot_)com
! 
! This program is part of the MHArc archiving system and comes with
! ABSOLUTELY NO WARRANTY and may be copied only under the terms of
! the GNU General Public License, which may be found in the MHArc
! distribution.
! 
! =cut
! 

Index: web-archive
===================================================================
RCS file: /cvsroot/mhonarc/mharc/bin/web-archive,v
retrieving revision 1.27
retrieving revision 1.28
diff -C2 -r1.27 -r1.28
*** web-archive	7 Jul 2002 06:22:51 -0000	1.27
--- web-archive	23 Jul 2002 04:00:21 -0000	1.28
***************
*** 53,57 ****
    my $clstatus = GetOptions(\%opt,
      'alllistsurl=s',	# Root to all lists URL.
!     'debug',		# Show what is going on in detail.
      'editidx',		# Edit archive pages; useful to apply MHonArc resource
  		        # changes.
--- 53,57 ----
    my $clstatus = GetOptions(\%opt,
      'alllistsurl=s',	# Root to all lists URL.
!     'debug|verbose',    # Show what is going on in detail.
      'editidx',		# Edit archive pages; useful to apply MHonArc resource
  		        # changes.
***************
*** 86,89 ****
--- 86,90 ----
  
    my $HOME		= $opt{'home'} ||
+ 				$config->{'SW_ROOT'} ||
  				"$Dir/..";
    my $ROOT_URL 		= $opt{'rooturl'} ||
***************
*** 139,142 ****
--- 140,146 ----
  				$config->{'SEARCH_CGI'} ||
  				join('/', $ROOT_URL,'cgi-bin/namazu.cgi');
+   my $EXTRACT_CGI	= $opt{'extractchcgi'} ||
+ 				$config->{'EXTRACT_CGI'} ||
+ 				join('/', $ROOT_URL,'cgi-bin/extract-mesg.cgi');
  
    my $rebuild  		= $opt{'rebuild'} ||
***************
*** 302,305 ****
--- 306,310 ----
  	'-definevar', "SEARCH-CGI=$SEARCH_CGI",
  	'-definevar', "PNAV-CGI=$MNAV_CGI",
+ 	'-definevar', "EXTRACT-CGI=$EXTRACT_CGI",
  	'-definevar', "ALL-LISTS-URL=$ALL_LISTS_URL",
  
***************
*** 581,588 ****
  If not specified, defaults to value of C<-htmlurl>.
  
- =item C<-debug>
- 
- Show what is going on in detail.
- 
  =item C<-editidx>
  
--- 586,589 ----
***************
*** 697,700 ****
--- 698,705 ----
  URL to search cgi program.
  If not specified, C<I<rooturl>/cgi-bin/namazu.cgi> is used.
+ 
+ =item C<-verbose>
+ 
+ Show what is going on in detail.
  
  =back

---------------------------------------------------------------------
To sign-off this list, send email to majordomo(_at_)mhonarc(_dot_)org with the
message text UNSUBSCRIBE MHONARC-DEV