5.3 A Quick TourThe other commands in a configuration file tend to be more complex than the version command you just saw (so complex, in fact, that whole chapters are dedicated to most of them). Here, we present a quick tour of each command - just enough to give you the flavor of a configuration file but in small enough bites to be easily digested. 5.3.1 Mail Delivery Agents
Recall that the
sendmail
program does not generally deliver mail itself.
Instead, it calls other programs to perform that delivery.
The
Mlocal, P=/bin/mail, F=lsDFMAw5:/|@rmn, S=10, R=20/40,
This tells
sendmail
that 5.3.2 Macros
The ability to define a value once and then use it
in many places makes maintaining your
sendmail.cf
file easier.
The
DRmail.us.edu a single letter D{REMOTE}mail.us.edu multiple characters (beginning with V8.7)
Here, 5.3.3 Rules
At the heart of the
sendmail.cf
file are sequences of rules that
rewrite (transform) mail addresses from one form to another.
This is necessary chiefly because addresses must conform to many
differing standards. The
R$- $@ $1 @ $R user -> user @ remote
Mail addresses are compared to the rule on
the left (
Use of multicharacter macros and
R$- # If a plain user name $@ $1 @ ${REMOTE} # append "@" remote host The details of rules like this are more fully explained beginning in Chapter 8, Addresses and Rules , and detailed in Chapter 28, Rules . 5.3.4 Rule Sets
Because rewriting may require several steps, rules are
organized into sets, which can be thought of as subroutines.
The
S3
This particular
SHubset
This particular
All the 5.3.5 Class Macros
There are times when the single text value of a
CW localhost fontserver a single letter C{MY_NAMES} localhost fontserver multiple characters (beginning with V8.7)
Here, each contains two items: 5.3.6 File Class Macros
To make administration easier, it is often convenient to store
long or volatile lists of values in a file.
The
FW/etc/mynames F{MY_NAMES}/etc/mynames multiple characters (beginning with V8.7)
Here, the file class macros The file class macro can also take its list of values from the output of a program. That form looks like this:
FM|/bin/shownames F{MY_NAMES}|/bin/shownames multiple characters (beginning with V8.7)
Here,
sendmail
runs the program 5.3.7 OptionsOptions tell the sendmail program many useful and necessary things. They specify the location of key files, set timeouts, and define how sendmail will act and how it will dispose of errors. They can be used to tune sendmail to meet your particular needs.
The
OQ/var/spool/mqueue O QueueDirectory= /var/spool/mqueue beginning with V8.7
Here, 5.3.8 Headers
Mail messages are composed of two parts: a header followed (after
a blank line) by the body. The body may contain virtually anything.
[4]
The header, on the other hand, contains lines
of information that must strictly conform to certain standards.
The
HReceived: $?sfrom $s $.by $j ($v/$Z)$?r with $r$. id $i$?u for $u$.; $b
This particular 5.3.9 Priority
Not all mail has the same priority. Mass mailings (to a
mailing list, for example) should be transmitted after mail to
individual users.
The
Pjunk= -100
This particular 5.3.10 Trusted Users
For some software (such as UUCP) to function correctly, it must be able
to tell
sendmail
whom a mail message is from.
This is necessary when that software runs as a different user
identity (
uid
) than that specified in the
Troot daemon uucp
This particular 5.3.11 Keyed Databases
Certain information, such as a list of UUCP hosts, is better maintained
outside of the
sendmail.cf
file.
External databases (called
keyed
databases) provide faster
access to such information. Keyed databases were introduced with V8.6 and
come in several forms, the nature and location of which are declared
with the
Kuucp hash /etc/mail/uucphosts
This particular 5.3.12 Environment variables
The
sendmail
program is ultraparanoid about security. One way
to circumvent security with
suid
programs like
sendmail
is
by running them with bogus environmental variables. To prevent such
an end run, V8
sendmail
erases all its environment variables
when it starts. It then presets the values for a small set
of variables (such as TZ and SYSTYPE). This small, safe environment
is then passed to its delivery agents.
Beginning with
EPOSTGRESHOME=/home/postgres
Here, the environment variable POSTGRESHOME is assigned the value
/home/postgres
. This allows programs to use the
postgres
(1)
database to access information.
The |
|