mk-procmailrc - Generate procmailrc from lists.def


NAME

mk-procmailrc - Generate procmailrc from lists.def


SYNOPSIS

  mk-procmailrc
  mk-procmailrc [options]


DESCRIPTION

This program is part of mharc and the responsibility of generating the main procmailrc used by the filter-spool program. The procmailrc is generated from <mharc-root>/lib/lists.def.

This program is typically invoked by calling make from the mharc root directory with configuration options specified in <mharc-root>/lib/config.sh.


LIST DEFINITION FILE

The list definition file, <mharc-root>/lib/lists.def, is read to generate the procmailrc used by 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:

lists.def Supported Options

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.

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.

From-Address
Mail address of the list. This option is an alternative to Address for cases where the list can only be donoted by the From: field of the message. Some lists have the 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.

CVS-Commits
Boolean option (0 or 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.

CVS-Subject-Prefix
Option specifying the Subject: prefix used to denote CVS commits to the list. Used if CVS-Commits is specified.

Description
Brief description of list. This will be used as the main title of archive index pages.

Final
Boolean option (0 or 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 Name ``.catch'' (or the -catch-archive setting described in OPTIONS). Using ``.catch'' is handy for Final definitions to pre-catch messages that should not be placed in any list archive.

No-Raw-Link
Boolean option (0 or 1) if link to raw archive from period index page should be created. If set to 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.

Note: If this is the case, make sure to change the permission of the $MBOX_DIR/mbox/<list-name> 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 $MBOX_DIR/mbox/<list-name> directory permissions are unintentionally changed to world readable.

No-Search
Boolean option (mharc-root/mbox directory) if searching should be disabled. If set to 1, no search index will be created for the archive and the $SEARCH-FORM$ custom resource variable will be set to the empty string.

MHonArc-Options
Additional command-line options to pass to MHonArc. Command-line options are specified as they would be at the shell prompt.

Period
If archive is a yearly or monthly archive. Legal values are year or month. If Period is not defined, month is the default.

Procmail-Condition
Additional conditions to apply to base address check. The condition must be legal procmailrc syntax and should include any prefixing *, !, et. al.

Note: Care should be used when using this option, especially if CVS-Commits is true. When CVS-commits is true, an additionaly rule is already added to check for the CVS-Subject-Prefix setting.

lists.def Example

  ##  In this definition, we define multiple addresses to check.
  Name: mhonarc-users
  Description: MHonArc Users
  Address: mhonarc-users@mhonarc.org
  Address: mhonarc@ncsa.uiuc.edu
  Address: mhonarc@rosat.mpe-garching.mpg.de
  ##  This definition defines a list that receives CVS commits and those
  ##  commits should be separated into a special archive as to not
  ##  pollute the discussion messages with cvs commit messages
  Name: mhonarc-dev
  Description: MHonArc Development
  Address: mhonarc-dev@mhonarc.org
  CVS-Commits: 1
  CVS-Subject-Prefix: CVS:


OPTIONS

-catch-archive name
The name of the catch archive. The catch archive collects all messages that do not match any mailing list rules. If this option is not specified, the CATCH_ARCHIVE variable in config.sh is used, else the name ``.catch'' is used.

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.

-disable-catch-archive
If specified, no catch archive will be defined.

CAUTION: Care should be used when using this option since any message that does not match a normal rule will be lost.

-final-dest mailbox
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 -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 ``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 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 -final-dest is not specified, the FINAL_MSG_DESTINATION variable in config.sh is used, else /dev/null is used.

-help
Print out usage information.

-home pathname
Root pathname of archiving software and data. If not specified, SW_ROOT variable in config.sh is used, else the parent directory that contains this program is used.

-man
Print out entire manpage.

-mbox-dir pathname
Root pathname containing raw mailbox archives. If not specified, MBOX_DIR variable in config.sh is used, else -home/mbox is used.

-msgid-cache-size number-of-bytes
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 MSGID_CACHE_SIZE variable in config.sh is used, else 16384 will be used.

-out pathname
Output filename. If this option is not specified, the PROCMAILRC variable in config.sh is used, else -home/procmailrc.mharc is used.

If ``-'' is the pathname, then the procmailrc will be dumped to standard out.

-procmail-path pathname-list
The search path to be used by procmail. I.e. The value to give the PATH variable in the procmailrc. If this option is not specified, the PROCMAIL_PATH variable in config.sh is used.


FILES

<mharc-root>/lib/lists.def
Mailing lists definition file.

<mharc-root>/lib/config.sh
Main configuration file for mharc.


VERSION

$Id: mk-procmailrc,v 1.18 2002/09/15 03:33:08 ehood Exp $


AUTHOR

Earl Hood, earl@earlhood.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.

 mk-procmailrc - Generate procmailrc from lists.def