Online Book Reader

Home Category

UNIX System Administration Handbook - Evi Nemeth [334]

By Root 2675 0
were just taking form and were often changing every week. He came to realize that the fly was in fact an elephant and that his sledgehammer was just barely adequate.

sendmail can adapt to the whims of standards-makers thanks in part to the flexibility of its configuration file, which allows sendmail to meet the needs of a diverse community of users. The rest of this chapter is primarily devoted to the understanding and construction of this configuration file, the infamous sendmail.cf.

sendmail is a transport agent, a program that interfaces between user agents and delivery agents. It speaks the SMTP protocol and delivers messages to peers on remote machines via the Internet. sendmail’s list of chores includes:

• Controlling messages as they leave the user’s keyboard

• Understanding the recipients’ addresses

• Choosing an appropriate delivery or transport agent

• Rewriting addresses to a form understood by the delivery agent

• Reformatting headers as required

• Passing the transformed message to the delivery agent

sendmail also generates error messages and returns messages to the sender if they are undeliverable.

The history of sendmail


sendmail V5 was written by Eric Allman in 1983. One branch was enhanced by Lennart Lövstrand at the University of Linköping in Sweden in 1987 and called IDA sendmail.13

It was maintained by Neil Rickert and Paul Pomes. Another branch, King James Sendmail, was developed by Paul Vixie at DECWRL during 1989–1993. It was based on IDA sendmail but had a far greater emphasis on throughput and performance for commercial sites. IDA and KJS pioneered several of the features that are now included in sendmail V8, Eric’s major rewrite of 1993.

As of this writing, most vendors’ implementations of sendmail are derived from V8. They are typically a release or two behind the master version from Sendmail, Inc., however. Vendors often customize a particular version of sendmail and are then reluctant to upgrade their base system to include current revisions. See Table 19.5 for information about the versions of sendmail that are shipped with various systems.

Table 19.5 Vendors’ versions of sendmail (circa 2000)

a. Sunified

We base our discussion of sendmail on V8.11 and totally ignore both V5 and IDA, which are obsolete. V8 uses the m4 macro processor to allow easy configuration of the standard cases. This “config lite” is all that most sites need.

Unfortunately, if your configuration has a problem, you may have to base your debugging on an understanding of the raw config file, which we’ve heard described as unapproachable, daunting, picky, cryptic, onerous, infamous, boring, sadistic, confusing, tedious, ridiculous, obfuscated, and twisted. We have replaced the 22-page config file section from the second edition with a reference to the O’Reilly sendmail book by Bryan Costales and Eric Allman or the Sendmail Installation and Operations Guide that’s included with the sendmail distribution.

Vendor-supplied versions of sendmail


Table 19.5 lists the version of sendmail shipped with each of our example systems. It also shows where our friendly vendors have stashed the sendmail binary and its configuration file, sendmail.cf. We have listed sendmail.org as a vendor so that you can match their defaults if you replace your vendor’s version.

gcc is available from www.gnu.org.

New releases of sendmail are sometimes issued to address security problems; we suggest that you check the release notes from www.sendmail.org and upgrade if you have missed any security-related patches. You’ll need a C compiler and the m4 macro preprocessor (both of which are usually included in standard UNIX releases).

Sometimes it’s difficult to determine the actual sendmail base release, but if the vendor hasn’t meddled too much, you can run

# /usr/sbin/sendmail -d0.1 -bt < /dev/null

to make sendmail disclose its version, the options that were compiled into it, and who it thinks it is after reading the config file. The -d flag sets a debug level (see page 615 for more info on debugging

Return Main Page Previous Page Next Page

®Online Book Reader