Mail Delivery Agents; Procmail Configuration - Red Hat ENTERPRISE LINUX 5 - DEPLOYMENT Deployment Manual

Hide thumbs Also See for ENTERPRISE LINUX 5 - DEPLOYMENT:
Table of Contents

Advertisement

Chapter 24. Email
daemon is started, and any other mail daemon is stopped; thus making the changes take place
immediately.

24.5. Mail Delivery Agents

Red Hat Enterprise Linux includes two primary MDAs, Procmail and mail. Both of the applications
are considered LDAs and both move email from the MTA's spool file into the user's mailbox. However,
Procmail provides a robust filtering system.
This section details only Procmail. For information on the mail command, consult its man page.
Procmail delivers and filters email as it is placed in the mail spool file of the localhost. It is powerful,
gentle on system resources, and widely used. Procmail can play a critical role in delivering email to be
read by email client applications.
Procmail can be invoked in several different ways. Whenever an MTA places an email into the mail
spool file, Procmail is launched. Procmail then filters and files the email for the MUA and quits.
Alternatively, the MUA can be configured to execute Procmail any time a message is received so that
messages are moved into their correct mailboxes. By default, the presence of /etc/procmailrc or
of a .procmailrc file (also called an rc file) in the user's home directory invokes Procmail whenever
an MTA receives a new message.
Whether Procmail acts upon an email message depends upon whether the message matches a
specified set of conditions or recipes in the rc file. If a message matches a recipe, then the email is
placed in a specified file, is deleted, or is otherwise processed.
When Procmail starts, it reads the email message and separates the body from the header
information. Next, Procmail looks for /etc/procmailrc and rc files in the /etc/procmailrcs
directory for default, system-wide, Procmail environmental variables and recipes. Procmail then
searches for a .procmailrc file in the user's home directory. Many users also create additional rc
files for Procmail that are referred to within the .procmailrc file in their home directory.
By default, no system-wide rc files exist in the /etc/ directory and no .procmailrc files exist in
any user's home directory. Therefore, to use Procmail, each user must construct a .procmailrc file
with specific environment variables and rules.

24.5.1. Procmail Configuration

The Procmail configuration file contains important environmental variables. These variables specify
things such as which messages to sort and what to do with the messages that do not match any
recipes.
These environmental variables usually appear at the beginning of .procmailrc in the following
format:
<env-variable>="<value>"
In this example, <env-variable> is the name of the variable and <value> defines the variable.
There are many environment variables not used by most Procmail users and many of the more
important environment variables are already defined by a default value. Most of the time, the following
variables are used:
392

Advertisement

Table of Contents
loading

Table of Contents