A Quick Tour
The 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 in this book 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.
Mail delivery agents
Recall that the sendmail program
does not generally deliver mail itself. Instead, it
calls other programs to perform that delivery. The
M
command
defines a mail delivery agent (a program that
delivers the mail). For example, as was previously
shown:
Mlocal, P=/usr/lib/mail.local, F=lsDFMAw5:/|@qPSXfmnz9, S=EnvFromL/HdrFromL, R=EnvToL/HdrToL, T=DNS/RFC822/SMTP, A=mail.local -l
This tells sendmail that local
mail is to be
delivered by using the
/usr/lib/mail.local program.
The other parameters in these lines are covered in
Chapter 20 on page 711.
Macros
The ability to define a value once and then use it in
many places makes maintaining your
sendmail.cf file easier. The
D
sendmail.cf command defines a
macro. A macro’s name is either a single letter or
curly-brace-enclosed multiple characters. It has
text as a value. Once defined, that text can be
referenced symbolically elsewhere:
DRmail.us.edu ← a single letter D{REMOTE}mail.us.edu ← multiple characters (beginning with V8.7)
Here, R
and
{REMOTE}
are
macro names that have the string mail.us.edu
as their
values. Those values are accessed elsewhere in the
sendmail.cf
Get sendmail, 4th Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.