- New Mail Service Features
- Systems in a Mail Configuration
- Mail Service Programs
- Mailbox
- DNS and sendmail
- Aliases
- Mail Addressing
- Mail Services Files and Programs
Systems in a Mail Configuration
A mail configuration requires a minimum of two elements, which can be combined on the same system or can be provided by separate systems: a mail hub and mail clients. When you want users to be able to communicate with networks outside of your domain, you must also have a gateway. mailhost is a common DNS host alias assigned to the mail hub in any domain.
Figure 1 shows a typical electronic mail configuration that uses all elements. Each of these elements is identified and described in the following sections.
Figure 1 A Typical Electronic Mail Configuration
Gateway
A gateway is a system that handles connections between your network(s) and networks external to your site(s) such as the Internet, as shown in Figure 2. Note that both domains have a sendmail gateway host that is the only path out of their networks onto the Internet and, from there, to any other domain. You must customize the *mc file used to create the sendmail.cf file on the gateway system.
Figure 2 A Gateway Can Handle Connections Between Different Communications Protocols
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. Refer to the default /usr/lib/mail/cf/main-v7sun.mc file as an example if you want to write your own .mc file to use on a gateway system.
NOTE
The process you use to create sendmail configuration files has been changed. You must create a file with a .mc suffix and use the m4 macro processor and provided sendmail m4 macro files to build the sendmail.cf file. See "Testing the Rewriting Rulesthe -bt Flag" on page 54 for more information.
Mail Hub
A mail hub is a system that you designate as the main mail system on your network. The mail hub is the system to which other systems at the site forward mail that they cannot deliver. You designate a system as a mail hub by adding the word mailhost to the Internet Protocol (IP) address line in the system's /etc/hosts file or by adding a mailhost A (address) record to DNS for the mail hub in question. You should also write a *.mc file specific to your domain for your mail hub.
A mail hub is any system that stores mailboxes in the /var/mail directory. The mail hub is responsible for routing all of the mail from a client. When a client sends mail, the mail hub puts it in a queue for delivery. Once the mail is in the queue, the client can reboot or turn off the system without losing the 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 hub. If the recipient chooses to respond, the response goes to the user's mailbox on the server.
When the mailbox is on a mail hub, messages are delivered to the server, not directly to the client's system. When the mailbox is on the user's local system, the local system acts as its own mail hub if it does not mount /var/mail from another system.
If the mail hub is not the user's local system, users with NFS can mount the /var/mail directory in the /etc/vfstab file, use the automounter, or log in to the mail hub to read their mail.
A good candidate for a mail hub is a system with good network connectivity with a large amount of disk space for spooling incoming e-mail. The system should be backed up regularly. If your mail hub also doubles as your gateway, it should have connectivity to the Internet. If you have a stand-alone system that is not networked but is in a time-sharing configuration, you can treat the stand-alone as the mail hub of a one-system network. Similarly, if you have several systems on an Ethernet and none have phone lines, you can designate one as the mail hub. The mail hub can also provide home directories for users.
If the mail hub for a domain does not also store user home directories, it should at least be able to automount the home directories for all users. The mail hub needs to examine the .forward file in a user's home directory when trying to deliver messages to that user in case the user's e-mail is being forwarded to another location. If each user's home directory is not available to the mail hub, such forwarding does not work properly.
Table 1 shows some sample statistics about the size of mail messages and mail traffic at a computer company with about 200 employees who transmit large numbers of binaries (PDF files, executables, Excel spreadsheets, PowerPoint presentations) as attachments.
Table 1 Sample Statistics for Mail Messages and Traffic
Statistic |
Description |
10 Kbytes |
Average size of an e-mail message. |
1 Mbyte |
Amount of mail received by an average user in one day. |
1 Mbyte |
Small mailbox size (user reads mail regularly and stores messages elsewhere). |
200 Mbytes |
Large mailbox size (user stores long-term mail in /var/mail mailbox). |
50-75 Mbyte |
Recommended spooling space to allocate for each user's mailbox, based on the figures in this table. |
Mail Client
A mail client is any system that enables a user's mail spool file to be read through an NFS mount of /var/mail from a mail hub and, therefore, does not have a local /var/mail directory. You must make sure the mail client has the appropriate entry in the /etc/vfstab file and a mount point to mount the mailbox from the mail server or that it automounts the /var/mail directory.
NOTE
Mail clients often run sendmail, but they do not (or should not) listen for incoming sendmail connections from the network. Mail clients simply run sendmail so that sendmail can transmit e-mail sent from within the mail client to the nearest mail hub for processing.