Hardware Components
You can provide the three required elements of mail configuration in the same system or have separate systems provide these elements.
When users are to communicate with networks outside your domain, you must also add a fourth element, a mail gateway. For more information, refer to "Mail Gateway". The following sections describe each hardware component.
Mail Host
A mail host is the machine that you designate as the main mail machine on your network. A mail host is the machine to which other systems at the site forward mail that they cannot deliver. You designate a system as a mail host in the hosts database by adding the word mailhost to the right of the IP address in the local /etc/hosts file or in the hosts file in the name service. You must also use the main.cf file as the mail configuration file on the mail host system. For detailed task information, refer to "How to Set Up a Mail Host" in Chapter 25, Mail Services (Tasks).
A good candidate for a mail host is a system on the local area network that also has a modem for setting up PPP or UUCP links over telephone lines. Another good candidate is a system that is configured as a router from your network to the Internet global network. For more information, refer to Chapter 29, Solaris PPP 4.0 (Overview), Chapter 38, Overview of UUCP, and "Configuring Routers" in System Administration Guide: IP Services. If none of the systems on your local network has a modem, designate one as the mail host.
Some sites use standalone machines that are not networked in a time-sharing configuration. That is, the standalone machine serves terminals that are attached to its serial ports. You can set up electronic mail for this configuration by designating the standalone system as the mail host of a one-system network. "Overview of the Hardware Components" in Chapter 24, Mail Services (Overview) provides a figure that shows a typical email configuration.
Mail Server
A mailbox is a single file that contains email for a particular user. Mail is delivered to the system where the user's mailbox resides, which can be on a local machine or a remote server. A mail server is any system that maintains user mailboxes in its /var/mail directory. For task information, refer to "How to Set Up a Mail Server" in Chapter 25, Mail Services (Tasks).
The mail server routes all mail from a client. When a client sends mail, the mail server puts it in a queue for delivery. After the mail is in the queue, a user can reboot or turn off the client without losing those mail messages. When the recipient gets mail from a client, the path in the "From " line of the message contains the name of the mail server. If the recipient responds, the response goes to the user's mailbox. Good candidates for mail servers are systems that provide a home directory for users or systems that are backed up regularly.
If the mail server is not the user's local system, users in configurations that use NFS software can mount the /var/mail directory by using the /etc/vfstab file (if they have root access) or by using the automounter. If NFS support is not available, users can log in to the server to read their mail.
If users on your network send other types of mail, such as audio files or files from desktop publishing systems, you need to allocate more space on the mail server for mailboxes.
One advantage to establishing a mail server for all mailboxes is that it simplifies backups. Backups can be difficult to do when mail is spread over many systems. The disadvantage of storing many mailboxes on one server is that the server can be a single point of failure for many users. However, the advantages of providing good backups usually make the risk worthwhile.
Mail Client
A mail client is any system that receives mail on a mail server and does not have a local /var/mail directory. This type of configuration is known as remote mode. Remote mode is enabled by default in /etc/mail/subsidiary.cf.
You must check that the mail client has the appropriate entry in the /etc/vfstab file and a mount point to mount the mailbox from the mail server. Also, ensure that the alias for the client is directed to the mail server's host name, not to the client's name. For task information, refer to "How to Set Up a Mail Client" in Chapter 25, Mail Services (Tasks).
Mail Gateway
The mail gateway is a machine that handles connections between networks that run different communications protocols or communications between different networks that use the same protocol. For example, a mail gateway might connect a TCP/IP network to a network that runs the Systems Network Architecture (SNA) protocol suite.
The simplest mail gateway to set up is one that connects two networks that use the same protocol or mailer. This system handles mail with an address for which sendmail cannot find a recipient in your domain. If a mail gateway exists, sendmail uses it for sending and receiving mail outside your domain.
You can set up a mail gateway between two networks that use unmatched mailers, as shown in the next figure. To support this configuration, you must customize the sendmail.cf file on the mail gateway system, which can be a difficult and time-consuming process.
Figure 26-1 Gateway Between Different Communications Protocols
If you have to set up a mail gateway, you should find a gateway configuration file that is close to what you need and modify it to conform to your situation.
If you have a machine that provides connections to the Internet, you can configure that machine as the mail gateway. Carefully consider your site's security needs before you configure a mail gateway. You might need to create a firewall gateway between your corporate network and the outside world, and set up that gateway as the mail gateway. For task information, refer to "How to Set Up a Mail Gateway" in Chapter 25, Mail Services (Tasks).
Mail Service Programs and Files
Mail services include many programs and daemons that interact with each other. This section introduces the files, programs, terms, and concepts that are related to administering electronic mail.
Contents of the /usr/bin Directory
The following table shows the contents of the /usr/bin directory, which is used for mail services.
Name | Type | Description |
---|---|---|
File | A program to manipulate the NIS+ aliases map. | |
File | A user agent. | |
File | A filter to store mail in SunOS 4.1 mailbox format. | |
Link | A link to /usr/lib/sendmail. Used to list the mail queue. | |
File | A program that is used to read mail statistics that are stored in the /etc/mail/sendmail.st file (if present). | |
File | A user agent. | |
File | A program that connects to the mailer for address verification and debugging. | |
File | A command to "uncompile" the alias database. Refer to the uncompile information that is provided in the man page for praliases(1). | |
Link | A link to /usr/bin/mail. Command that is often used to permit only the sending of mail. | |
File | A command to set up an automatic reply to mail. |
Contents of the /etc/mail Directory
The following table shows the contents of the /etc/mail directory.
Name | Type | Description |
---|---|---|
File | Default settings for the mailtool user agent. | |
File | Mail-forwarding information. | |
File | Default binary form of mail-forwarding information (created by running newaliases). | |
File | Binary form of mail-forwarding information (created by running newaliases). Can still be used, but is no longer used by default in the Solaris 9 release. | |
File | Binary form of mail-forwarding information (created by running newaliases). Can still be used, but is no longer used by default in the Solaris 9 release. | |
File | Default settings for the mailx user agent. | |
File | Sample configuration file for main systems. | |
File | List of all domains for which relaying is allowed. By default, only the local domain is allowed. | |
File | Configuration file for mail routing. | |
File | New configuration file for the mail submission program (MSP). For more information, refer to "New Configuration File, submit.cf". | |
File | Optional file that you can create if the number of aliases for the mail host is too long. | |
File | Help file that is used by the SMTP HELP command. | |
File | File that lists the PID of the listening daemon and is now in /var/run. | |
File | sendmail statistics file. If this file is present, sendmail logs the amount of traffic through each mailer. | |
File | Sample configuration file for subsidiary systems. | |
File | File that lists the users (one per line) who can be trusted to perform certain mail operations. By default, only root is in this file. Certain mail operations, when performed by untrusted users, result in the following warning, X-Authentication-Warning: header being added to a message. |