.\" Copyright (c) 2001 Dominic Mitchell. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: .\" 1. Redistributions of source code must retain the above copyright .\" notice, this list of conditions and the following disclaimer. .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. .\" .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" .\" @(#) $Id: pgen.1,v 1.4 2001/07/11 12:26:50 dom Exp $ .TH pgen 1 "Local Software" .SH NAME pgen \- procmailrc generator .SH SYNOPSIS pgen [\-d type] [\-o outfile] procmail.m4 .SH DESCRIPTION .B pgen runs over .I procmail.m4 using the .BR m4 (1) macro processor and some predefined macros. These macros make it easier to maintain a procmailrc file. The output can be used as your .I ~/.procmailrc file. The contents of procmail.m4 should be the same as described in .BR procmailrc (5), with the exception of the macros described below. .SH OPTIONS .IP \fI\-d\fR Specify the default type of mailbox to be used. The choice can be any one of the list below, except JUNK (must be in caps). If this option is not given, the choice defaults to MBOX. .IP \fI\-o\fR Specify the destination file, instead of standard output. .SH MACROS The following macros will be expanded in the input. Several of them take a .I type argument. It can be one of JUNK (discard the mail), RCVSTORE (save it into an MH folder), MH (save it into an MH folder, without updating the unseen sequence), MAILDIR (save into djb's own nfs-resilient mailbox format) or MBOX (save it into a standard mbox file). .IP "STOPDUPS()" Include a procmail recipe for eradicating duplicate messages that arrive (based on their message-id). This uses .BR formail (1), so it must be in your PATH. .IP "LIST(listname, folder [, type])" Specify that mail that arrives for .I listname will be sent to .IR folder . .I Listname is a regular expression that is matched against one of the following headers in the incoming mail: To, Cc, and Return-Path. .IP "SUBJ(subject, folder [, type])" Specify that mail that arrives with a subject of .I subject will be sent to .IR folder . .I Subject is a regular expression that is matched against the Subject: header in the incoming mail. .IP "FROM(whom, folder [, type])" Specify that mail that arrives from .I whom will be sent to .IR folder . .I Whom is a regular expression that is matched against the From: and Sender: headers in the incoming mail. .IP "ARG(word, folder [, type])" Specify that mail that comes in for you with an argument of .I word goes into .IR folder . Normally, the argument is the piece of your email address that comes after your username. For instance, given the address dom+pgen@happygiraffe.net, the argument would be .IR pgen . .IP "START(listname)" Specifies the beginning of a block of macros, that will be used only when .I listname matches the To:, Cc: and Return-Path: headers. .IP "END()" Ends the block begun by the START macro. .SH "SEE ALSO" .BR formail (1), .BR m4 (1), .BR procmail (1), .BR procmailex (5), .BR procmailrc (5). .SH AUTHOR Dominic Mitchell, .IR "" . .SH BUGS .P Cockroach.