Previous | Table of Contents | Next |
THIS CHAPTER DESCRIBES HOW TO SET UP, TEST, ADMINISTER, AND TROUBLESHOOT MAIL services. If you are not familiar with administering mail services, read Chapter 1, "Understanding Mail Services," for an introduction to the terminology and structure of the mail services. Read Chapter 2, "Planning Mail Services," for descriptions of several mail services configurations.
You can set up a mail service relatively easily if your site does not provide connections to electronic mail services outside of your company or if your company is in a single domain. Setting up complicated sites with multiple domains is beyond the scope of this book. Chapter 4, "Customizing sendmail Configuration Files," contains information about how to create the more complicated configuration files required for sites with multiple domains.
Mail requires three types of configurations for local mail and a fourth for communication with networks outside of your domain. These configurations can be combined on the same system or provided by separate systems. A fifth, optional type of mail configuration is called a gateway. Table 3-1 describes each of these configurations.
Configuration | Description |
---|---|
Mail server | You need to have at least one mail server. The mail server stores mailboxes in the /var/mail directory. |
Mailhost | You need at least one mailhost. The mailhost resolves difficult email addresses and reroutes mail within your domain. |
Mail client | Mail clients are users who have mailboxes either locally or on a mail server. |
Relay host | A relay host manages communication with networks outside of your domain. |
Gateway | A gateway is a connection between different communications networks. A relay host may also act as a gateway. You must add rules to the sendmail.cf file to set up a gateway. See Chapter 4 for information about adding rules. Another helpful reference is Chapter 15 of the UNIX System Administration Handbook, published by Prentice-Hall. (See the bibliography at the end of this book for more information.) If you have to set up a gateway, find a gateway configuration file that is close to what you need and modify it to fit your situation. |
Before you begin to set up your mail service, choose the systems that will act as mail servers, mailhosts, and relay hosts. You should also make a list of all of the mail clients you will be providing service for and indicate the location of their mailboxes. This list will help you when you are ready to create mail aliases for your users. See Chapter 1 for more information about the function each of these systems provides. For your convenience, guidelines about which systems are good candidates for mail servers, mailhosts, and relay hosts are described in the following sections.
To simplify the setup instructions, the following sections tell you what you need to do to set up individual mail servers, mailhosts, mail clients, and relay hosts. If a system in your mail services configuration is acting in more than one capacity, simply follow the appropriate instructions for each type of system. For example, if your mailhost and mail server are the same system, follow the directions for setting up that system as a mailhost and then follow the directions for setting up the same system as a mail server.
NOTE: The following procedures for setting up a mail server and a mail client apply when mailboxes are NFS-mounted. You do not need to follow these procedures when mailboxes are maintained in locally mounted /var/mail directories.
The mail server is responsible for routing all of the mail from a client. The only resource requirement for a mail server is that it have adequate spooling space for client mailboxes. See Chapter 1 for recommendations about spooling space.
To set up a mail server, the /var directory must be exported. On SunOS 5.x systems, type share and then press Return to check whether the /var directory is exported. In this example, the /var/mail directory is not exported:
cinderella% share cinderella%
If the /var directory is not exported, become superuser and then type share -F nfs -o rw /var/mail and then press Return. You can type share with no arguments to verify that the directory is exported. You can also add the line to the /etc/dfs/dfstab file so that the file system is shared when the system is rebooted.
cinderella% share cinderella% su Password: cinderella# share -F nfs -o rw /var/mail cinderella# share - /var/mail rw "" cinderella# vi /etc/dfs/dfstab Add the line: share -F nfs -o rw /var/mail
NOTE: The sendmail program automatically creates mailboxes in the /var/mail directory the first time a message is delivered. You do not need to create individual mailboxes for your mail clients.
Previous | Table of Contents | Next |