The sendmail configuration file is usually called sendmail.cf. It provides all the central information that controls the sendmail program's behavior. Among the key pieces of information provided are the following:
The location of all the other files that sendmail needs to access and the location of all the directories in which sendmail needs to create and remove files.
The definitions that sendmail uses in rewriting addresses. Some of those definitions can come from files, which are also specified.
The mail header lines that sendmail should modify, pass through, and/or augment.
The rules and sets of rules that sendmail uses for transforming mail addresses (and aliases for those addresses) into usable information, such as which delivery agent to use and the correct form of the address to use with that delivery agent.
The location of the sendmail.cf file is compiled into sendmail. It is usually found in one of the directories /etc, /usr/lib, or /etc/mail. If you are compiling sendmail, you may specify the location of that file yourself by defining _PATH_SENDMAILCF in your Makefile (see Section 18.8.34, PATH...). V8.7 recommends that the sendmail.cf file be located in /etc for consistency.  Some vendors, however, prefer other locations. We recommend that one of the standard locations be used unless you have a compelling reason to do otherwise. Nonstandard locations may, for example, make operating system upgrades difficult if you need to revert to prior or vendor versions of sendmail.
 Scripts that may be distributed in the future will need the location of the sendmail.cf file to locate other files. If you move the sendmail.cf from its recommended standard location, you will have to modify all such scripts before they can be used.
The configuration file is read and parsed by sendmail every time it starts up. Because sendmail is run every time electronic mail is sent, its configuration file is designed to be easy for sendmail to parse rather than easy for humans to read.
The sendmail.cf file is line-oriented, with one configuration command per line. Each configuration command consists of a single letter  that must begin a line. Each letter is followed by other information as required by the purpose of the particular command.
 A quick bit of history: Initially, there was almost nothing in the configuration file except
Rrules (and there was only one rule set). Eric recalls adding
Ofairly quickly. Commands such as
Vcame quite late.
In addition to commands, the configuration file may also have
lines that begin with a
# to form a comment line or with
a tab or space character to form a continuation line.
A list of all legal characters that may begin
a line in the configuration file is shown in
|Section 27.2, "Comments"||All||A comment line, ignored|
|space||Section 27.4, "Continuation Lines"||All||Continue the previous line|
|tab||Section 27.4||All||Continue the previous line|
|Section 32.1, "Class Configuration Commands"||All||Define a class macro|
|Section 31.3, "Configuration File Definitions"||All||Define a macro|
|Section 22.2.1, "The E Configuration Command"||8.7 and above||Environment for agents|
|Section 32.1||All||Define a class macro from a file or a pipe|
|Section 35.1, "The H Configuration Command"||All||Define a header|
|Section 33.3, "The K Configuration Command"||V8.1 and above||Create a keyed map entry|
|Section 30.1, "Configuration File Syntax"||All||Define a mail delivery agent|
|Section 34.2, "Configuration-File Options"||All||Define an option|
|Section 35.8, "Precedence"||All||Define delivery priorities|
|Section 28.1, "Overview"||All||Define a transformation rule|
|Section 29.1, "The S Configuration Command"||All||Declare a rule-set start|
|Section 126.96.36.199, "Declare trusted users (not V8.1 through V8.6)"||All||Declare trusted users (ignored V8.1-V8.6)|
|Section 27.5, "The V Configuration Command"||V8.1 and above||Version of configuration file|
Most configuration commands are so complex that each requires
a chapter or two of its own. A few, however, are simple.
In this chapter we will describe the simple ones: comments, continuation lines,
V (version) command.