The Local Info Section:
Local Info, the first section in the sendmail.cf
file, contains the hostname, the names of any mail
relay hosts, and the mail domain. It also contains the name that sendmail uses to identify itself when
it returns error messages, as well as the version number of the sendmail.cf
file.
The local information is defined by D commands that define macros, C commands that define class
values, F commands that load class values from files, and K commands that define databases of
information. Some sample lines lifted from the Local Info section of the Red Hat sendmail.cf
file are
shown in the listing below. The commands have been reordered, and a comment has been added to
make the commands more understandable, but the commands themselves are just as they appear
in the original file.
# my name for error messages
DnMAILER-DAEMON
# operators that cannot be in local usernames
CO @ % !
# host name aliases for this system
Cwlocalhost
# file containing names of hosts for which we receive email
Fw/etc/mail/local-host-names
# Access list database (for spam stomping)
Kaccess hash -o /etc/mail/access.db
Lines that begin with # are comments. The first real command in the sample is a define macro (D) command that defines the username that sendmail uses when sending error messages. The macro being defined is n. Many macro names are only a single upper- or lowercase character. When a long name is used, the name is enclosed in curly braces, for example, {verify}.
The value assigned to n is MAILER-DAEMON. After a value is stored in a macro, it can be recalled later in the configuration using the syntax $x, where x is the name of the macro. Thus, commands later in the configuration that need to send error messages can use $n to retrieve the correct sender name. Setting a macro value once at the beginning of the configuration affects commands throughout the configuration, which simplifies customization.
The first class command (C) assigns the values @, %, and ! to the class variable O. These three values are characters that cannot be used in local usernames because they would screw up e-mail. A class is an array of values. Classes are used in pattern-matching to check whether or not a values matches one of the values in a class, using the syntax $=x, where x is the name of the class. A command containing the string $=O is testing a value to see if it is equal to @, % or !.