Installing and Administering Internet Services

136 Chapter 4
Installing and Administering sendmail
How sendmail Works
How sendmail Collects Messages
sendmail can receive messages from any of the following:
A user agent that calls sendmail to route a piece of mail. User
agents that are supported by HP for use with HP-UX 11.0 sendmail
include elm, mail, mailx, and rmail.
•Asendmail daemon or other mail program that calls sendmail to
route a piece of mail received from the network or the mail queue.
A user that calls sendmail directly from the command line.
How sendmail Routes Messages
To route the message, sendmail does the following:
1. Rewrites the recipient and sender addresses given to it to conform to
the standards of the target network.
2. If necessary, adds lines to the message header so that the recipient is
able to reply.
3. Passes the mail to one of several specialized delivery agents for
delivery.
Figure 4-1 outlines the flow of messages through sendmail.
Once sendmail collects a message, it routes the message to each of the
specified recipient addresses. In order to route a message to a particular
address, sendmail must resolve that address to a {delivery agent, host,
user} triple. This resolution is based on rules defined in the sendmail
configuration file, /etc/mail/sendmail.cf.
A separate delivery agent is invoked for each host to which messages are
being routed. Some delivery agents can accept multiple users in a given
invocation. Others must be invoked separately for each recipient.
Delivery agents that are supported by HP for use with HP-UX 11.0
sendmail include SMTP, UUCP, X.400, and OpenMail.
To invoke a delivery agent, sendmail constructs a command line
according to a template in the configuration file.
If the delivery agent is specified as IPC, sendmail does not invoke an
external delivery agent but instead opens a TCP/IP connection to the
SMTP server on the specified host and transmits the message using
SMTP.