The precedence of a mail message determines its position among other messages in the queue when the queue is processed. Precedence, as a header line, also defines whether or not a bounced message should be returned to the sender. Precedences are not hard-coded into sendmail. Instead, they need to be declared in the configuration file. The typical declarations, and the ones we will use, look like this:
Pspecial-delivery=100 Pfirst-class=0 Plist=-30 Pbulk=-60 Pjunk=-100
These lines use the
P (precedence) configuration command.
Like all configuration
P must begin the line. It is followed
by a name, an equal sign, and a value. The general form
looks like this:
There are only five possibilities for
name that are legal:
This mail message needs to be processed before any others. This
precedence is effective only when the message is being delivered
from the queue.
Unless otherwise declared with a
the message is
first-class by default.
The message originated as part of a mailing list. It should be
deferred until other more important mail has been processed
from the queue.
The message is a broadcast, like a mailing list but less important.
If the message can't be delivered, the message body is discarded
from the bounced mail.
Absolutely worthless mail. Test messages and mail from some
programs fall into this category. Like
bulk, the message
body is discarded from the bounced mail.
value assigned to each
name is somewhat arbitrary.
The ones that we use are common. As you gain familiarity with the
queue and mailing lists, you may want to adjust these values.
In general, the higher the number, the higher the precedence.
By convention, formal first-class mail has a precedence of zero, with
positive numbers used
mail and negative numbers
used for various kinds of bulk mail.
P configuration command only tells sendmail
value to assign to a given
has no other effect. The values are used only when a mail
message is processed that has a
line in it. The inclusion of
Precedence: header lines
is left to MUAs.
To illustrate, imagine that a user on your machine is managing
a mailing list. The software that is used to create each message
for the list arranges to include a
that looks like this:
The mailing-list message is given to sendmail on the local
machine. The local sendmail sees the
in the message and extracts the field of that header, the
It then compares
list to each of the
parts of its
P configuration lines. It finds a match
with the line:
Because it finds a match, it uses the
value from this
configuration command as the initial precedence of the mail message.
If there is no match (or if the original message lacks
Precedence: header), the initial precedence of the
mail message defaults to zero.
P configuration commands to
the client.cf file. Traditionally, they are placed after the header
H?D?Date: $a # Add if F=D H?M?Message-Id: <[email protected]$j> # Add if F=M