pgen(1)

NAME
pgen - procmailrc generator

SYNOPSIS
pgen [-d type] [-o outfile] procmail.m4

DESCRIPTION
pgen runs over procmail.m4 using the 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 ~/.procmailrc file. The contents of procmail.m4 should be the same as described in procmailrc(5), with the exception of the macros described below.

OPTIONS

-d  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.

-o  Specify the destination file, instead of standard output.

MACROS
The following macros will be expanded in the input. Several of them take a 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).

STOPDUPS()
    Include a procmail recipe for eradicating duplicate messages that arrive (based on their message-id). This uses formail(1), so it must be in your PATH.

LIST(listname, folder [, type])
    Specify that mail that arrives for listname will be sent to folder. Listname is a regular expression that is matched against one of the following headers in the incoming mail: To, Cc, and Return-Path.

SUBJ(subject, folder [, type])
    Specify that mail that arrives with a subject of subject will be sent to folder. Subject is a regular expression that is matched against the Subject: header in the incoming mail.

FROM(whom, folder [, type])
    Specify that mail that arrives from whom will be sent to folder. Whom is a regular expression that is matched against the From: and Sender: headers in the incoming mail.

ARG(word, folder [, type])
    Specify that mail that comes in for you with an argument of word goes into 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 pgen.

START(listname)
    Specifies the beginning of a block of macros, that will be used only when listname matches the To:, Cc: and Return-Path: headers.

END()
    Ends the block begun by the START macro.

SEE ALSO
formail(1), m4(1), procmail(1), procmailex(5), procmailrc(5).

AUTHOR
Dominic Mitchell, <dom+pgen@happygiraffe.net>.

BUGS

Cockroach.