|Previous||Table of Contents||Next|
Mail services are provided by a combination of these programs that interact, as shown by the simplified diagram in Figure 1-6.
Figure 1-6 How mail programs interact.
Users send messages using programs such as /bin/mailx or mailtool. See the manual pages for information about these programs.
The message is collected by the program that was used to generate it and is passed to the sendmail daemon. The sendmail daemon parses (divides into identifiable segments) the addresses in the message, using information from the configuration file /etc/mail/sendmail.cf to determine network name syntax, aliasing, forwarding information, and network topology. Using this information, sendmail determines the route a message must take to get to a recipient.
The sendmail daemon passes the message to the appropriate system. The /bin/mail program on the local system delivers the mail to the mailbox in the /var/mail/username directory of the recipient of the message.
The user is notified that mail has arrived and retrieves it using /bin/mail, /bin/mailx, mailtool, dtmail, or a similar program.
SunOS 5.x system software uses sendmail as a mail router. The sendmail program is responsible for receiving and delivering electronic mail messages. It is an interface between mail-reading programs such as mail, mailx, mailtool, dtmail, and mail-transport programs such as uucp. The sendmail program performs the following functions:
Figure 1-7 shows how sendmail uses aliases. Programs that read mail, such as /usr/bin/mailx, can have aliases of their own, which are expanded before the message reaches sendmail.
Figure 1-7 How sendmail uses aliases.
As system administrator, you should choose a policy for updating aliases and forwarding mail messages. You might set up an aliases mailbox as a place for users to send requests for mail forwarding and changes to their default mail alias. If your system uses NIS or NIS+, you can administer forwarding rather than forcing users to manage it themselves. A common mistake users make is to put a .forward file in the home directory of Host A that forwards mail to user@host-b. When the mail gets to Host B, sendmail looks up the user in the NIS or NIS+ aliases and sends the message back to user@host-a, resulting in a loop and more bounced mail.
A configuration file controls the way that sendmail performs its functions. The configuration file determines the choice of delivery agents, address-rewriting rules, and the format of the mail header.
The sendmail program uses the information from the /etc/mail/sendmail.cf file to perform its functions. Each system has a default sendmail.cf file installed in the /etc/mail directory. You do not need to edit or change the default configuration file for mail servers or mail clients. The only systems that require a customized configuration file are the mailhost, a relay host, or a gateway. See "Mail Services Terminology" earlier in this chapter or the glossary at the back of this book for descriptions of each of these types of systems.
SunOS 5.x system software provides two default configuration files, which are also in the /etc/mail directory:
Which configuration file you use on any individual system depends on the role the system plays in your mail service.
The following list describes some configuration parameters you may want to change, depending on the requirements of your site:
Refer to Chapter 3 for information on setting up the sendmail.cf files. Refer to Chapter 4 for a detailed description of each of these parameters.
|Previous||Table of Contents||Next|