Previous Table of Contents Next


Setting Up a 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. Adding rules to the sendmail.cf file is beyond the scope of this chapter. See Chapter 4 for information about adding rules. Another helpful reference is the UNIX System Administration Handbook, Chapter 15; see the bibliography at the end of this book for the complete reference.

If you have to set up a gateway, your best bet is to find a gateway configuration file that is close to what you need and modify it to fit your situation. Most gateway files must be customized for each site. The main.cf file is a good place to start.

Creating Mail Aliases

Use the aliasadm command to create, modify, and delete aliases from a command line. See the aliasadm(1M) manual page for more information. Alternatively, if you have the Solstice AdminSuite available, you can use the Database Manager to edit the Aliases database.

Setting Up NIS Alias Files

It is likely that you have a network that has a mixture of systems running SunOS 4.x and SunOS 5.x system software. To help you administer networks with systems running different versions of SunOS system software, this section describes how to set up mail aliases on a SunOS 4.x NIS master server.


NOTE:  On SunOS 4.x systems, the aliases file is located in the /etc directory, not in /etc/mail.

The /etc/aliases file on an NIS master contains all of the names by which a system or person is known. The NIS master is searched if there is no match in the local /etc/aliases (for SunOS 4.x systems) or /etc/mail/aliases (for SunOS 5.x systems) file. The sendmail program uses the NIS master file to determine mailing addresses. See the aliases(5) manual page for more information.

The /etc/aliases file on the NIS master should contain entries for all of the mail clients. You can either edit the file on each system or edit the file on one system and copy it to each of the other systems.

Aliases are of the following form:

name: name1, name2,...

You can alias local names or domains. For example, an alias entry for the user fred, who has a mailbox on the system oak and is in the domain Trees, would be this entry in the /etc/aliases file:

fred: fred@Trees

Follow these steps to set up NIS mail aliases files:

1.  Compile a list of each of your mail clients, the locations of their mailboxes, and the names of the mail server systems.
2.  Become superuser on the NIS master server.
3.  Edit the /etc/aliases file and make the following entries:
  Add an entry for each mail client.
  Change the entry Postmaster: root to the mail address of the person who is designated as postmaster. See "Setting Up the Postmaster Alias" later in the chapter for more information.
  If you have created a mailbox for the administration of a mail server, create an entry for root: mailbox@mailserver.
  Save the changes.
4.  Edit the /etc/hosts file on the NIS master server and create an entry for each mail server.
5.  Type cd /var/yp and then press Return.
6.  Type make and then press Return. The changes in the /etc/hosts and /etc/aliases files are propagated to NIS slave systems. It takes a few minutes, at most, for the aliases to take effect.

Setting Up Local Mail Alias Files

The /etc/mail aliases file on a local SunOS 5.x system contains all of the names by which a system or person is known. The sendmail program uses this file to look up mailing addresses. See the aliases(5) manual page for more information.

The /etc/mail/aliases file of each system should contain entries for all mail user accounts. You can either edit the file on each system or edit the file on one system and copy it to each of the other systems.

You can use Admintool to edit local /etc/mail/aliases files.


NOTE:  Before you can use Admintool to edit a local /etc/mail/aliases file, you must either have superuser access to the local system or be a member of the sysadmin group (GID 14).

It is a good idea to create an administrative account for each mail server. You do this by assigning root a mailbox on the mail server and adding an entry to the /etc/mail/aliases file for root. For example, if the system oak is a mailbox server, add the entry root: sysadmin@oak to the /etc/mail/aliases file.

To set up local mail aliases files:

1.  Compile a list of each of your mail clients and the locations of their mailboxes.
2.  Become superuser on the mail server.
3.  Using the Database Manager's Aliases Database window, make the following entries:
  Add an entry for each mail user account.
  Change the entry Postmaster: root to the mail address of the person who is designated as postmaster. See "Setting Up the Postmaster Alias" later in the chapter for more information.
  If you have created a mailbox for the administration of a mail server, create an entry for root: mailbox@mailserver.
  Save the changes.
4.  To re-create the same information on each of the other systems, you can enter it again using the AdminSuite Database Manager. Alternatively, you can copy the /etc/mail/aliases, /etc/mail/aliases.dir, and /etc/mail/aliases.pag files to each of the other systems. You can copy the file by using the rcp or rdist command or by using a script that you create for this purpose. Remember that you must update all of the /etc/mail/aliases files each time you add or remove a mail client.


Previous Table of Contents Next