5. The sendmail.cf File
Contents:
The lines of text in a sendmail.cf file have been described by some as resembling modem noise and by others as resembling Mr. Dithers swearing in the comic strip Blondie .
R$+@$=W sendmail.cf file {$/{{.+ modem noise !@#!@@! Mr. Dithers swearing Constructs like the following can certainly be intimidating to the newcomer:
R$+@$=W $@$1@$H user@thishost -> user@hub R$=W!$+ $@$2@$H thishost!user -> user@hub R@$=W:$+ $@@$H:$2 @thishost:something R$+%$=W $@$>3$1@$2 user%thishost But think back to your early days of C programming. Did you feel any more comfortable with an expression like this?
#define getc(p) (-(p)->_cnt>=0? ((int)*(p)->_ptr++):_filbuf(p)) Like any new language, learning the language that is used in the sendmail.cf file requires time and practice. In the chapters that follow, we introduce that language, but first we present an overview of the sendmail.cf file. 5.1 OverviewThe sendmail.cf file is read and parsed by sendmail every time sendmail starts. It contains information that is necessary for sendmail to run. It lists the locations of important files and specifies the default permissions for those files. It contains options that modify sendmail 's behavior. Most important, it contains rules and rule sets for rewriting addresses. The sendmail.cf configuration file is line-oriented. A configuration command, composed of a single letter, begins each line:
V7 good V7 bad, does not begin a line V7 Fw/etc/mxhosts bad, two commands on one line Fw/etc/mxhosts good
Each configuration command
is followed by parameters that are specific to it.
For example, the
Some commands, such as
Blank lines and lines that begin
with the
# a comment V7 /Berkeley <- continuation of V line above tab
Note that anything other than a command,
a blank line,
a space, a tab, or a
sendmail.cf: line 15: unknown control line "v6"
Here,
sendmail
found a line in its
sendmail.cf
file
that began with the letter An example of each kind of command is illustrated in the following sections. They are actual commands that you will see described throughout this tutorial. Don't be concerned if you don't understand the details at this time. All that is now mysterious will eventually become clear. |
|