36. Procmail
36.1 Overview
1. Mail processor.
2. Can be invoked via the .forward file, or directly by sendmail.
3. User configuration file is $HOME/.procmailrc.
4. Package: procmail
36.2 Configuration File Syntax
1. Format:
2. :0 [flags] [ : [locallockfile] ]
5. Flags
See procmailrc(5) man page for a description of the flags.
6. Special characters
o :
Indicates the start of a recipe. Commonly used with a zero following it. In the old days, the zero was replaced with the number of conditions that follow.
o *
Indicates the start of a condition.
o !
When used in a condition, it means to invert the condition. When used in an action line, it means to forward the mail to the addresses that follow.
o Pipe ()
Starts the program specified after it when used in the action line.
o { }
When followed by at least one space, tab, or newline, it marks the beginning of a nesting block for the action line.
36.3 Example .procmailrc
*^From.*bob # Condition
{ :0 c # “c” flag means create a carbon copy
! steve@somedomain.org # Action – Forward to steve and keep a local copy
This will forward mail from bob about computers to steve and also keep a local copy in the COMPUTERS folder.

Download the Ensurepass Latest 2013 RHCE EX300 Practise Test PDF to pass RHCE EX300 exam.

Comments are closed.