Red Hat ENTERPRISE LINUX 3 Reference Manual page 191

Hide thumbs Also See for ENTERPRISE LINUX 3:
Table of Contents

Advertisement

Chapter 11. Email
The first two characters in a Procmail recipe are a colon and a zero. Various flags can be placed after
the zero to control how Procmail processes the recipe. A colon after the
that a lockfile is created for this message. If a lockfile is created, the name can be specified by replacing
lockfile-name
A recipe can contain several conditions to match against the message. If it has no conditions, every
message matches the recipe. Regular expressions are placed in some conditions to facilitate message
matching. If multiple conditions are used, they must all match for the action to be performed. Con-
ditions are checked based on the flags set in the recipe's first line. Optional special characters placed
after the
character can further control the condition.
*
The
action-to-perform
ditions. There can only be one action per recipe. In many cases, the name of a mailbox is used here
to direct matching messages into that file, effectively sorting the email. Special action characters may
also be used before the action is specified. Refer to Section 11.4.2.4 Special Conditions and Actions
for more information about special action characters.
11.4.2.1. Delivering vs. Non-Delivering Recipes
The action used if the recipe matches a particular message determines whether it is considered a
delivering or non-delivering recipe. A delivering recipe contains an action that writes the message to
a file, sends the message to another program, or forwards the message to another email address. A non-
delivering recipe covers any other actions, such as nesting block. A nesting block is a set of actions,
contained in braces
{ }
blocks can be nested inside one another, providing greater control for identifying and performing
actions on messages.
When messages match a delivering recipe, Procmail performs the specified action and stops compar-
ing the message against any other recipes. Messages that match non-delivering recipes continue to be
compared against other recipes.
11.4.2.2. Flags
Flags are essential to determine how or if a recipe's conditions are compared to a message. The
following flags are commonly used:
— Specifies that this recipe is only used if the previous recipe without an
A
this message.
— Specifies that this recipe is only used if the previous recipe with an
a
this message and was successfully completed.
— Parses the body of the message and looks for matching conditions.
B
— Uses the body in any resulting action, such as writing the message to a file or forwarding it.
b
This is the default behavior.
— Generates a carbon copy of the email. This is useful with delivering recipes, since the required
c
action can be performed on the message and a copy of the message can continue being processed
in the
files.
rc
— Makes the
D
egrep
sensitive.
— While similar to the
E
the immediately preceding the recipe without an
action.
— The recipe is compared to the message only if the action specified in the immediately preceding
e
recipe fails.
.
specifies the action taken when the message matches one of the con-
, that are performed on messages which match the recipe's conditions. Nesting
comparison case-sensitive. By default, the comparison process is not case-
flag, the conditions in the recipe are only compared to the message if
A
flag did not match. This is comparable to an else
E
section specifies
flags
or
flag also matched
A
a
or
flag also matched
A
a
173

Advertisement

Table of Contents
loading

Table of Contents