The sendmail Configuration File:
The file that defines the sendmail runtime configuration is sendmail.cf
, which is a large, complex file
that is divided into seven different sections. The file is so large and so complex that system
administrators are often intimidated by it. You needn't be. The file is designed to be easily parsed by
sendmail, not to be easily written by a system administrator. But normally, you don't directly write to
this file. Instead, you build the file with the m4 commands described later in this chapter. It is
important to have a basic understanding of the syntax and structure of the sendmail.cf file in order
to better understand the effect of the m4 commands and to gain the mastery needed for
troubleshooting. Yet it is equally important to realize that you don't have to build the sendmail.cf
file
by hand.
The section labels from the Red Hat sendmail.cf
file provide an overview of the structure and the
function of the file. The sections, each examined in detail in this chapter, are as follows:
- Local InfoThis section defines the configuration information specific to the local host.
- OptionsThis section sets the options that define the sendmail environment.
- Message PrecedenceThis section defines the users who are allowed to change the sender address when they are sending mail.
- Format of HeadersThis section defines the headers that sendmail inserts into mail.
- Rewriting RulesThis section holds the commands that rewrite e-mail addresses from user mail programs into the form required by the mail-delivery programs.
- Mailer DefinitionsThis section defines the programs used to deliver the mail. The rewrite rules used by the mailers are also defined in this section.
Note:
All Linux sendmail.cf
files have the same structure because they are all created from
the m4 macros that come in the sendmail distribution.