UNIX System Administration Handbook - Evi Nemeth [318]
We tried to divide this chapter into four smaller ones (on mail systems, sendmail configuration, spam, and Postfix), but that left it confusing, full of chicken-and-egg problems, and, we think, less useful. Instead, we offer the annotated table of contents shown in Table 19.1.
Table 19.1 A road map for this chapter
This organization makes the flow a bit smoother when the chapter is read straight through, but it sometimes separates the items relevant to a particular email-related task. The postmaster for a medium-sized organization might need to read the entire chapter, but a sysadmin setting up PC email support for a typical business client surely does not.
Table 19.2 provides a navigation guide for several common sysadmin chores.
Table 19.2 An index of chores
Most of this chapter deals with the configuration of sendmail, the UNIX program that parses and routes electronic mail. sendmail was originally written by Eric Allman at the University of California, Berkeley. There have been three major versions: version 5, IDA, and version 8. Version 9 is looming on the horizon. Version 5 and IDA are no longer in common use; version 8 has replaced them. In this chapter we cover version 8 (8.11, to be precise) and look ahead to the features that are expected in version 9.
sendmail is being developed commercially by Sendmail, Inc., which also maintains a free, open source version. The commercial versions feature a graphical configuration user interface and performance enhancements that are not yet included in the open source version.
sendmail is still going strong, but several new open source mail transport agents have emerged over the last few years, most notably Postfix by Wietse Venema of TCP wrappers fame. We discuss Postfix briefly starting on page 618. The other alternatives are mentioned only in passing.
19.1 MAIL SYSTEMS
In theory, a mail system consists of four distinct components:
• A “mail user agent” (MUA) that lets users read and compose mail
• A “mail transport agent” (MTA) that routes messages among machines
• A “delivery agent” that places messages in a local message store1
• An optional “access agent” that connects the user agent to the message store (e.g., IMAP or POP)
Some sites also use a mail submission agent that speaks SMTP (the mail transport protocol) and does some of the work of the transport agent. Exhibit A shows the relationship of these components.
Exhibit A Mail system components
User agents
Email users employ a user agent to read and compose messages. Email messages originally consisted only of text, but a standard known as Multipurpose Internet Mail Extensions (MIME) is now used to encode text formats and attachments (including many viruses) into email. It is supported by most user agents. Since it does not affect the addressing or transport of mail, we do not discuss it further in this chapter.2
One chore of user agents is to make sure that any text embedded in the contents of a mail message that might be misunderstood by the mail system gets protected. An example is the string “From” that is used as a record separator between messages.
/bin/mail was the original user agent. Several alternatives now exist. The popular user agents are listed below, along with their original sources.
• /bin/mail from the original UNIX
• /usr/ucb/mail from BSD3
• mh and nmh (“new mh”) based on software from the Rand Corporation, plus the exmh front end by Brent Welch of Scriptics
• pine by from the University of Washington, www.washington.edu/pine
• elm by David Taylor, now maintained by the Elm Development Group and Kari Hurrta, available from ftp.virginia.edu
• mutt by Michael Elkins, available from ftp.mutt.org
• rmail and VM, mail user agents that are part of emacs and XEmacs
• Communicator from Netscape Communications, for a variety of platforms
• Eudora