Previous Table of Contents Next

Setting Up a Mail Client

A mail client is a user of mail services that has a mailbox on a mail server and a mail alias in the Aliases database or local /etc/mail/aliases file. This alias is used to indicate the location of the mailbox.

Follow these steps to set up a SunOS 5.x mail client with a mailbox on a mail server. (When instructions for setting up a SunOS 4.x mail client are different than those for 5.x, the SunOS 4.x instructions are included in parentheses.)

1.  Become superuser on the mail client's system.
2.  Create a /var/mail mount point on the mail client's system.
3.  Edit the /etc/vfstab file and add an entry to mount the /var/mail directory from the mail server on the local /var/mail directory--type <servername>:/var/mail - /var/mail nfs - yes rw and then press Return. With an entry in the client system's /etc/vfstab file, the client's mailbox is automatically mounted any time that system is rebooted. (To set up a SunOS 4.x mail client, edit the client's /etc/fstab file.)
4.  Type mountall to mount the mailbox. The client's mailbox is mounted. (On SunOS 4.x mail clients, type mount -a to mount the mailbox.)
5.  Use the Solstice AdminSuite Hosts Manager to edit the Hosts database and add an entry for the mail server. (For SunOS 4.x systems, edit the /etc/hosts file and add an entry for the mail server.)
6.  Add the user accounts for the client system to the Aliases database. See "Creating Mail Aliases" later in this chapter for information on how to create mail aliases for different types of mail configurations. (For SunOS 4.x systems, add the client to the /etc/aliases file.)

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.

This example sets up the SunOS 5.x system newton as a mail client of the system cinderella:

newton% su
newton# mkdir /var/mail
newton# vi /etc/vfstab
Add the line:
cinderella:/var/mail  -  /var/mail  nfs  -  yes  rw
newton# mountall
newton# solstice&

If you have Solstice AdminSuite, you can use the Database Manager graphical user interface to add user accounts to the Aliases database.

Setting Up a Mailhost

A mailhost resolves difficult email addresses and reroutes mail within your domain. A good candidate for a mailhost is a system that connects you to the outside world or to a parent domain.

Follow these steps to set up a mailhost:

1.  Log into the mailhost system as yourself.
2.  Edit the /etc/hosts file of the mailhost system and designate the system by typing mailhost after the system's IP address. The system is designated as a mailhost. If you are not using NIS+, NIS, or DNS, you must create an entry in the /etc/hosts file for each system on the network. The /etc/hosts entry should use this format: IP address mailhost_name mailhost.
3.  Type cp /etc/mail/ /etc/mail/ and then press Return. The file is copied to the file
# cp /etc/mail/ /etc/mail/
4.  Reboot the mailhost and test your mail configuration. See "Testing Your Mail Configuration" later in the chapter for more information.
# init 6

Setting Up a Relay Host

A relay host manages communications with networks outside of your domain that use the same relay mailer. The mailer on the sending relay host must match the mailer on the receiving system.

For example, a good candidate for a relay host is a system attached to an ethernet and to phone lines. Another good candidate is a system configured as a router to the Internet. You may want to configure the mailhost as the relay host or to configure another system as the relay host. You may choose to configure more than one relay host for your domain. Each relay host you configure must use a mailer that matches the mailer on the connecting system. If you have uucp connections, you should configure the system (or systems) that have the uucp connections as the relay host. Follow these steps to set up a relay host:

1.  Become superuser on the relay host system.
2.  Type cp /etc/mail/ /etc/mail/ and then press Return. The file is copied and renamed
3.  Edit the /etc/mail/ file and make the following changes:
  If your relay mailer is uucp, you do not need to change this entry. If your relay mailer is not uucp, change the default entry (DMsmartuucp) to the entry that is appropriate for your relay mailer. Available mailers are smartuucp (the default), ddn, ether, and uucp. You can specify a different relay mailer for each relay host (if appropriate). You can define rule sets for other relay mailers in the file. See "Mailers" in Chapter 1 for a description of each of the default relay mailers.
  In the entry DR ddn-gateway, replace ddn-gateway with the name of your relay host. The DR entry defines the relay host.
  In the entry CR ddn-gateway, replace ddn-gateway with the name of your relay host. The CR entry defines the class of the relay host. You can designate one or more hosts as a member of this class.
  (Optional) Add a Dmmail_domain or Lmmaildomain entry to define the mail domain name. If the macro is not defined, the naming service domain name is used, with the first component stripped off. For example, Ecd.East.Sun.COM becomes East.Sun.Com. If you use the L command, sendmail looks up the name to use in the sendmailvars table using maildomain as the search key.
  Save the edits.
4.  Reboot the mailhost and test your mail configuration.

In this example, the system oak is set up as a relay host:

castle% rlogin oak
oak% su
# cp /etc/mail/ /etc/mail/
# vi /etc/mail/
Replace DR ddn-gateway and CR ddn-gateway with:
DR oak
CR oak
Save changes and quit.
# init 6

Previous Table of Contents Next