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
, on the other hand, need to have sendmail run the
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:
- If the recipient receives mail on the same machine as the sender, sendmail delivers
the mail using the /usr/sbin/mail.local program.
- If the recipient’s machine is connected to the sending machine using UUCP, it uses uux to send the mail message.
- If the recipient’s machine is on the Internet, the sending machine transports the mail using SMTP.
- Otherwise, the mail message might need to be transported over another network (such as Bitnet) or possibly rejected.