Installing and Administering Internet Services

Chapter 4 143
Installing and Administering sendmail
How sendmail Works
Figure 4-2 sendmail Client-Server Operation
Outgoing mail from user1 can be “local” mail that is intended for any
user on mailclient. Local mail is forwarded to mailserv; this is
specified by the setting of the DH macro entry in the
/etc/mail/sendmail.cf file on mailclient. (The sendmail
installation script sets the DH macro value to the host specified by
SENDMAIL_SERVER_NAME.) Outgoing mail that is not local is sent by
mailclient to the remote host using MX records. Note that because the
DM macro entry in the /etc/mail/sendmail.cf file on mailclient is
set to mailserv.company.com, mail from user1 appears to be from
user1@mailserv.company.com.
Since mail sent to remote hosts from user1 is sent from
user1@mailserv.company.com, replies to user1’s messages are
returned to mailserv. On mailserv, when sendmail receives mail for
user1, it looks up user1 in the aliases database and redirects mail for
user1 to user1@mailclient.
You can modify sendmail server and client operations. Most
modifications involve changing or re-creating the
/etc/mail/sendmail.cf file on the server or client systems. For
example, you can define the DM macro on a mail server system. You can
mailserv
mailclient
user1
company.com Domain
Local mail to/from
Outgoing remote mail from
user1@mailserv.company.com
Incoming remote mail to
user1@mailserv.company.com
Incoming remote mail for
user1@mailclient
mailclient users
Internet