Unix Network Admin   «Prev  Next»
Lesson 3 sendmail agent
ObjectiveDescribe the advantages of using the latest version of sendmail.

Sendmail Agent (Advantages)

The oldest and the most commonly used Mail Transfer Agent on the Internet is sendmail. It is delivered as part of many standard UNIX distributions, including Solaris and Linux.
In this course, we’ll be using sendmail 8.8.9. More recent releases of sendmail are somewhat easier to configure. In addition, sendmail has tended to be extremely vulnerable to security weaknesses. For these reasons, you should use the most current version of sendmail as possible. You can obtain sendmail at proofpoint.com.

Why sendmail Is So Complex

In its simplest role, that of transporting mail from 1) a user on one machine to 2) another user on the same machine, sendmail is almost trivial. All vendors supply a sendmail (and a configuration file) that will accomplish this. But as your needs increase, the job of sendmail becomes more complicated, and its configuration file becomes more complex. On hosts that are connected to the Internet, for example, sendmail should use the Domain Name System (DNS) to translate hostnames into network addresses. Machines with UUCP connections[1], on the other hand, need to have sendmail run the uux program.
The sendmail program needs to transport mail between a wide variety of machines. Consequently, its configuration file is designed to be very flexible. This concept allows a single binary to be distributed to many machines, where the configuration file can be customized to suit particular needs. This configurability contributes to making sendmail complex. When mail needs to be delivered to a particular user, for example, the sendmail program decides on the appropriate delivery method based on its configuration file. The decision process might include the following steps:
  1. If the recipient receives mail on the same machine as the sender, sendmail delivers the mail using the /usr/sbin/mail.local program.
  2. If the recipient’s machine is connected to the sending machine using UUCP, it uses uux to send the mail message.
  3. If the recipient’s machine is on the Internet, the sending machine transports the mail using SMTP.
  4. Otherwise, the mail message might need to be transported over another network (such as Bitnet) or possibly rejected.

Simplified Configuration Scheme

One of the most significant improvements in recent versions of sendmail is the adoption of a simplified configuration scheme. The sendmail agent is controlled by a configuration file (sendmail.cf) that is notoriously complicated. Beginning with sendmail 8.7, you can assemble your configuration file by putting together pieces of code written in a macro language called M4, and then using M4 to generate the final configuration file. As you learn about configuring sendmail, you will learn about how to use M4.
Before you learn about configuring sendmail, however, you need to learn more about how sendmail implements SMTP (Simple Mail Transfer Protocol). The sendmail agent runs as a daemon program. It relays, or transfers, email between machines using the SMTP protocol or an older, essentially obsolete protocol called UUCP (UNIX to UNIX Copy). We will concentrate entirely on SMTP.
Note: There are other MTA's in current use as well, and I would recommend finding an alternative to qmail.org.

[1]UUCP connections:UUCP is an acronym of Unix-to-Unix Copy. The term generally refers to a suite of computer programs and protocols allowing remote execution of commands and transfer of files, email and netnews between computers.