Update of /cvsroot/mhonarc/mharc/bin
In directory subversions:/tmp/cvs-serv17816/bin
Modified Files:
mk-procmailrc web-archive
Log Message:
* Added support for Check-No-Archive for lists.def.
* Documentation updates.
Index: mk-procmailrc
===================================================================
RCS file: /cvsroot/mhonarc/mharc/bin/mk-procmailrc,v
retrieving revision 1.18
retrieving revision 1.19
diff -C2 -r1.18 -r1.19
*** mk-procmailrc 15 Sep 2002 03:33:08 -0000 1.18
--- mk-procmailrc 29 Sep 2002 03:41:18 -0000 1.19
***************
*** 155,158 ****
--- 155,159 ----
$addr,
$period,
+ $noarchive,
$pm_conditions,
$pm_copy,
***************
*** 224,227 ****
--- 225,240 ----
}
+ # check if sender specified no archiving should be honored
+ if ($listdef->{$name}{'check-no-archive'}) {
+ $noarchive =<<'EOT';
+
+ :0
+ * ^(X-no-archive: yes|Restrict: no-external-archive)
+ /dev/null
+ EOT
+ } else {
+ $noarchive = "";
+ }
+
# check if separating out cvs commits
if ($check_cvs = $listdef->{$name}{'cvs-commits'}[0]) {
***************
*** 233,237 ****
$pm_conditions
* ^Subject: $cvs_prefix
! {
:0 Wi
CMDEXEC_=| mkdir -m 755 -p \$MBOXROOT/$name.CVS
--- 246,250 ----
$pm_conditions
* ^Subject: $cvs_prefix
! {$noarchive
:0 Wi
CMDEXEC_=| mkdir -m 755 -p \$MBOXROOT/$name.CVS
***************
*** 253,257 ****
:0
$pm_conditions
! {
:0 Wi
HAVEMATCH=|echo yes
--- 266,270 ----
:0
$pm_conditions
! {$noarchive
:0 Wi
HAVEMATCH=|echo yes
***************
*** 323,329 ****
=head1 DESCRIPTION
! This program is part of mharc and the responsibility of generating
! the main procmailrc used by the L<filter-spool|filter-spool> program.
! The procmailrc is generated from C<E<lt>mharc-rootE<gt>/lib/lists.def>.
This program is typically invoked by calling C<make> from
--- 336,342 ----
=head1 DESCRIPTION
! This program is part of mharc and generates the main procmailrc used by
! the L<filter-spool|filter-spool> program. The procmailrc is generated
! from C<E<lt>mharc-rootE<gt>/lib/lists.def>.
This program is typically invoked by calling C<make> from
***************
*** 333,341 ****
=head1 LIST DEFINITION FILE
! The list definition file, C<E<lt>mharc-rootE<gt>/lib/lists.def>, is
! read to generate the procmailrc used by L<filter-spool|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:
--- 346,353 ----
=head1 LIST DEFINITION FILE
! The list definition file, C<E<lt>mharc-rootE<gt>/lib/lists.def>,
! controls how the procmailrc used by L<filter-spool|filter-spool>
! is generated. The format of the file is simple and more convenient
! than writing the procmailrc file yourself.
The basic format of the file is as follows:
***************
*** 353,357 ****
Option-Name: Option-Value
! is an option to be read by this program.
=back
--- 365,369 ----
Option-Name: Option-Value
! is an option.
=back
***************
*** 363,463 ****
=item Name
! Starts, and defines, the name of the list to be archived. This name
! will be used as the directory name to contain the archives of the list
! and the short title. Typical notation is to use the list address,
! but this is not required, especially if the archive is a combination
! of multiple lists, or it is prefered to use a more abstract name
! in case the list address may change in the future.
=item Address
Mail address of the list.
! This option can be specified multiple times.
! Multiple addresses can be use to capture the multiple addresses that represent
! a single list or to represent multiple lists to be archived together.
! =item From-Address
! Mail address of the list. This option is an alternative to C<Address>
! for cases where the list can only be donoted by the C<From: > field
! of the message. Some lists have the C<To: > to be the subscriber's
! address instead of to the list address. This is fairly common for
! one-way lists like newsletters where subscribers receive list messages
! but cannot post to the list.
!
! This option can be specified multiple times.
! Multiple addresses can be use to capture the multiple addresses that represent
! a single list or to represent multiple lists to be archived together.
=item CVS-Commits
! Boolean option (C<0> or C<1>) if the CVS commits to the list should be
! separated out into a separate archive.
! This option is useful for development lists that have all CVS commits
! of a project mailed to the list. This option allows the CVS commits
! to be separated out into a separate archive so it will not pollute
! the main archive that contains discussions.
=item CVS-Subject-Prefix
! Option specifying the C<Subject:> prefix used to denote CVS commits to
! the list. Used if CVS-Commits is specified.
=item Description
! Brief description of list. This will be used as the main title of
! archive index pages.
=item Final
! Boolean option (C<0> or C<1>) if generated rule should be final
! if matched. I.e. If a message matches, further rules will not
! be examined.
!
! This option can be used to short-circuit messages from being
! archived in other archives. For example, you may want to catch
! messages that have been cross-posted to a special address to
! only be archived in the special address archive and not in the
! regular archives.
!
! Another example use of this option is if you use the special C<Name>
! "C<.catch>" (or the C<-catch-archive> setting described in L<"OPTIONS">).
! Using "C<.catch>" is handy for Final definitions to pre-catch messages
! that should not be placed in any list archive.
!
! =item No-Raw-Link
! Boolean option (C<0> or C<1>) if link to raw archive from period index
! page should be created. If set to C<1>, no link will be created.
! The default is to create a link to the raw archives.
!
! You may want to enable this option if your HTML archives have
! been customized to obscure address to prevent address harvesting.
!
! B<Note:> If this is the case, make sure to change the permission
! of the C<$MBOX_DIR/mbox/I<E<lt>list-nameE<gt>>> directory so it is
! not readable by the HTTP server process so someone cannot backdoor
! into the raw archives. This is generally done by removing world
! read permission. Make sure the permissions do allow for the mharc
! archiving system to read and write to the directory.
!
! You could also explicitly deny access to the directory via
! the HTTP server configuration file. This is the recommended
! approach since it gives you additional protection in case the
! C<$MBOX_DIR/mbox/I<E<lt>list-nameE<gt>>> directory permissions are
! unintentionally changed to world readable.
! =item No-Search
! Boolean option (C<I<mharc-root>/mbox> directory) if searching should
! be disabled. If set to C<1>, no search index will be created for
! the archive and the C<$SEARCH-FORM$> custom resource variable will
! be set to the empty string.
=item MHonArc-Options
! Additional command-line options to pass to MHonArc. Command-line
! options are specified as they would be at the shell prompt.
=item Period
--- 375,467 ----
=item Name
! Starts, and defines, the name of an archive. This name serves as
! the directory name containing archive data and the short-title for
! archive pages. A common practice is to use the list address, but this
! is not required, especially if the archive is a combination of multiple
! lists, or it is prefered to use a more abstract name for simplicity.
=item Address
Mail address of the list.
! Multiple C<Address> options can be specified
! for an archive if a list has more than one known address (e.g. due
! to migration) or the archive is a collection of multiple lists.
! =item Check-No-Archive
! Boolean option (C<0> or C<1>) if author specified archiving permission
! is honored. The author can request no archiving should be done
! by defining one of the the following header fields:
!
! Restrict: no-external-archive
! X-no-archive: yes
!
! If C<Check-No-Archive> is enabled, a message to the list with either
! field defined will not be archived.
=item CVS-Commits
! Boolean option (C<0> or C<1>) if CVS commit messages should be
! archived separately.
! Use this option for development lists that have CVS project commits
! mailed to the list, and you want to avoid cluttering regular discussion
! mail.
=item CVS-Subject-Prefix
! Specifies the C<Subject:> prefix denoting CVS commits to the list.
! This option is only used if C<CVS-Commits> is specified.
=item Description
! Brief description of archive and serves as the main title of archive
! index pages.
=item Final
! Boolean option (C<0> or C<1>) if generated rule should be final.
! I.e. If a message matches, further rules will not be examined.
! Use this option to short-circuit messages from being stored in multiple
! archives. For example, you may want to catch messages cross-posted
! to a special address to only be archived in a special archive and
! not any of the regular archives.
!
! Another example is if you use the special C<Name> "C<.catch>"
! (or the C<-catch-archive> setting described in L<"OPTIONS">).
! Using "C<.catch>" is handy for C<Final> definitions to pre-catch
! messages that should not be placed in any list archive.
! =item From-Address
! Mail address of the list. This option is an alternative to C<Address>
! where a list can only be donoted by the C<From: > field of messages.
! This is fairly common for one-way lists, like newsletters, where
! subscribers receive list messages but cannot post to the list.
!
! Multiple C<From-Address> options can be specified if a list has more
! than one known address (e.g. due to migration) or the archive is a
! collection of multiple lists.
=item MHonArc-Options
! Additional MHonArc command-line options.
!
! =item No-Raw-Link
!
! Boolean option (C<0> or C<1>) if links to raw archives should exist.
! If set to C<1>, links will not be created or disabled. The
! default value for this option is C<0>.
!
! Use this option if your HTML archives have been customized to obscure
! address to prevent address harvesting.
!
! =item No-Search
!
! Boolean option (C<0> or C<1>) if searching should
! be disabled. If set to C<1>, no search index is created and the
! C<$SEARCH-FORM$> custom resource variable will be set to the empty
! string.
=item Period
***************
*** 468,478 ****
=item Procmail-Condition
! Additional conditions to apply to base address check. The condition
must be legal procmailrc syntax and should include any prefixing C<*>,
! C<!>, et. al.
! B<Note:> Care should be used when using this option, especially if
C<CVS-Commits> is true. When C<CVS-commits> is true, an additionaly
! rule is already added to check for the C<CVS-Subject-Prefix> setting.
=back
--- 472,482 ----
=item Procmail-Condition
! Additional condition to apply to base address check. The condition
must be legal procmailrc syntax and should include any prefixing C<*>,
! C<!>, et. al. This option can be specified multiple times.
! B<CAUTION:> Exercise caution when using this option, especially if
C<CVS-Commits> is true. When C<CVS-commits> is true, an additionaly
! rule already exists to check for the C<CVS-Subject-Prefix> setting.
=back
***************
*** 498,501 ****
--- 502,510 ----
=head1 OPTIONS
+ You should never have to invoke this program with any options since
+ C<config.sh> specifies any options used by this program. However,
+ for advanced uses, or you do not care if you mess things up, the
+ following options are available:
+
=over
***************
*** 503,514 ****
The name of the I<catch> archive. The I<catch> archive collects
! all messages that do not match any mailing list rules. If this
option is not specified, the C<CATCH_ARCHIVE> variable in
C<config.sh> is used, else the name "C<.catch>" is used.
B<Note:> If you use this option, it is recommended that the name
! starts with a '.'. This insures that no search index built for
! the archive (a saving in resources) and it will not be listed
! in a HTTP (Apache) directory listing.
=item C<-disable-catch-archive>
--- 512,522 ----
The name of the I<catch> archive. The I<catch> archive collects
! all messages that do not match any list rules. If this
option is not specified, the C<CATCH_ARCHIVE> variable in
C<config.sh> is used, else the name "C<.catch>" is used.
B<Note:> If you use this option, it is recommended that the name
! starts with a C<.> (a dot). This insures that no search index is built
! and it will not be listed in the all-lists page.
=item C<-disable-catch-archive>
***************
*** 522,539 ****
The destination of messages that make it to the end of the procmailrc.
- In normal operations, it should be okay to discard messages at the
- end since it should have matched one of the list rules or have been
- caught by the catch archive (see C<-catch-archive>).
-
It is normal for messages to make it to the end since the list matching
! rules create copies of the message during filtering. This typically
! will be apparent by the "C<Folder: /dev/null>" destinations in the
! procmail log. Message copying is done inorder to properly archive a
! message that has been cross-posted to multiple lists that are being
! archived. Exceptions to the message copying are for lists with the
! C<Final> option set to 1, for CVS commit archives, or for messages
! that are captured by the catch archive.
! This option is generally only set for debugging purposes.
If C<-final-dest> is not specified, the
--- 530,544 ----
The destination of messages that make it to the end of the procmailrc.
It is normal for messages to make it to the end since the list matching
! rules create copies of the message during filtering. Hence, it is
! normal to see "C<Folder: /dev/null>" destinations in the procmail log
! and it does not indicate that a message was lost.
!
! Message copying is done inorder to properly archive a message that has
! been cross-posted to multiple lists. Message copying is not done for
! archives with the C<Final> option set to 1, for CVS commit archives,
! or for messages that are captured by the catch archive.
! This option is generally only used for debugging purposes.
If C<-final-dest> is not specified, the
***************
*** 547,553 ****
=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>
--- 552,560 ----
=item C<-home> I<pathname>
! B<You should not use this option>.
!
! Root pathname of software and archives. If not specified,
C<SW_ROOT> variable in C<config.sh> is used, else the parent directory
! that containing this program is used.
=item C<-man>
***************
*** 564,568 ****
The maximum size, in bytes, of the message-id cache. The message-id
! cache is used to avoid processing duplicate messages.
If this option is not specified, the C<MSGID_CACHE_SIZE> variable
--- 571,575 ----
The maximum size, in bytes, of the message-id cache. The message-id
! cache helps avoid processing duplicate messages.
If this option is not specified, the C<MSGID_CACHE_SIZE> variable
***************
*** 580,586 ****
=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
--- 587,592 ----
=item C<-procmail-path> I<pathname-list>
! The search path for C<procmail> to use. If this option is not
! specified, the C<PROCMAIL_PATH> variable in C<config.sh> is used.
=back
Index: web-archive
===================================================================
RCS file: /cvsroot/mhonarc/mharc/bin/web-archive,v
retrieving revision 1.39
retrieving revision 1.40
diff -C2 -r1.39 -r1.40
*** web-archive 24 Sep 2002 19:48:01 -0000 1.39
--- web-archive 29 Sep 2002 03:41:18 -0000 1.40
***************
*** 389,392 ****
--- 389,395 ----
push(@mhaargs, '-add');
}
+ if ($listdef->{$listname}{'check-no-archive'}) {
+ push(@mhaargs, '-checknoarchive');
+ }
# add any custom options specified in definition file
---------------------------------------------------------------------
To sign-off this list, send email to majordomo(_at_)mhonarc(_dot_)org with the
message text UNSUBSCRIBE MHONARC-DEV