DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
sendmail administration

/usr/lib/sendmail.cf overview

A sendmail configuration file is organized as a series of lines, each of which begins with a single character defining the semantics for the rest of the line. Lines beginning with a space or a tab are continuation lines (although the semantics are not well defined in many places). Blank lines and lines beginning with a number sign (``#'') are comments.

The following paragraphs in this description of the standard configuration file refer to ``sections'' of the standard configuration file. When viewing the configuration file /usr/lib/sendmail.cf, these sections are differentiated by comments constructed to look like headers by encircling them with number signs (``#'').

Macros

The first two sections of the standard configuration file consist of macro definitions. These are lines that begin with the letter ``D''. The defined macros are described in ``D--define macro''.

Macros can be used in three ways. They can transmit unstructured textual information into the mail system. An example of this is the name that sendmail uses to identify itself in error messages; the default, ``MAILER-DAEMON'', is defined like this:

   DnMAILER-DAEMON
Macros can transmit information from sendmail to the configuration file in creating other fields (such as argument vectors to mailers). Examples are the sender name and the recipient host and user names. Other macros are unused internally. These macros can be used as shorthand in the configuration file.

Other example macros:

   DlFrom $g $d
   Do.:%@!^/[]
The first line defines the format of the mail ``From'' line. This definition results in ``From <sender_address> <current_date>''. The second line defines the delimiter characters used in addresses (this defines the delimiters ``.:%@!^/[]'').

Options

The next section in the file consists of options. These are lines that begin with the letter ``O''. There are several options that can be set from the configuration file. These include the pathnames of various support files, timeouts, default modes, and so forth. See ``O--set option'' for a complete list of these options. Because options can also be set as an argument in the invocation of sendmail, some of the most useful are also listed in the sendmail(ADMN) manual page.

Example options:

   OA/usr/lib/mail/aliases
   OT3d
The first line defines the location of the alias file (/usr/lib/mail/aliases in this option setting). The second line defines the timeout interval for undelivered mail (this option definition specifies that undelivered mail is returned after 3 days).

Message precedences

This next section in the file assigns values to mail precedence names. These values are used to compute a priority for a mail message. sendmail uses this priority to order mail messages in the mail queue. See ``Altering queue priorities'' for a description of how precedence values are used.

Example precedence setting:

   Pspecial-delivery=100
This setting defines a value of 100 for messages that include ``special-delivery'' in the ``Precedence:'' field. (The lower the value, the higher priority given the message.)

Format of headers

This next section in the file contains header declarations that inform sendmail of the format of known header lines. Knowledge of a few header lines is built into sendmail, such as the ``From:'' and ``Date:'' lines. See ``H--define header'' for a description of how headers are declared and ``D--define macro''. for a description of the macros used.

Most configured headers are automatically inserted into the outgoing message if they do not exist in the incoming message. Certain headers are suppressed by some mailers.

Example header format:

   H?D?Date: $a
   H?F?From: $q
The first line declares a ``Date:'' header and defines its contents to be the origination date in RFC 822 format. The second line declares a ``From:'' header and defines its contents to be the sender's address.

Address rewriting rules

The next several sections of the file are the rewriting rules which sendmail uses to parse addresses. These are lines beginning with the letter ``S'', which names the ruleset to which the following rules belong, and the letter ``R'', which are the rules.

There are multiple rule sets with specific purposes. These purposes are discussed in ``Semantics of rewriting rule sets''.

Mailer declarations

At the end of the standard configuration file are sections that contain the mailer declarations. These are lines beginning with the letter ``M''. You will see rewriting rule lines between and after the mailer declaration lines. These are for rulesets that customize addresses for specific mailers.

Mailer declarations tell sendmail of the various mailers available to it. A mailer declaration specifies the internal name of the mailer, the pathname of the program to call, some of the flags associated with the mailer, and an argument vector to be used in the call to the mailer. See ``M--define mailer''.

Example mailer declaration:

   Mlocal, P=/usr/bin/lmail, F=lsFDMPuhCE, S=10, R=20, A=lmail $u

Next topic: Configuration file lines
Previous topic: Advanced sendmail configuration

© 2003 Caldera International, Inc. All rights reserved.
SCO OpenServer Release 5.0.7 -- 11 February 2003