Setting Up Mail Services

To simplify the setup instructions, the following sections tell you how to set up individual mail hubs, mail clients, and gateway 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 mail hub and gateway are the same system, follow the directions for setting up that system as a mail hub and then follow the directions for setting up the same system as a mail gateway.

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.


Setting Up a Mail Hub

The mail hub is responsible for routing all of the mail from a client. The only resource requirement for a mail hub is that it have adequate spooling space for client mailboxes. See Chapter 1, “Understanding Mail Services,” for recommendations about spooling space.

To set up a mail hub, you must export the /var directory. On Solaris systems, type share and press Return to check whether the /var directory is exported. In the following 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 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:
# share -F nfs -o rw /var/mail
# share

-            /var/mail    rw  ""
# vi /etc/dfs/dfstab
							Add the line:
							share -F nfs -o rw /var/mail
						

NOTE

The mail.local 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.


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

Use the following steps to set up a mail hub.

1.
Become superuser on the mail hub system.

2.
Type /usr/lib/mail/sh/check-hostname and press Return.

The check-hostname script verifies whether sendmail can identify the fully qualified host name for this server. If the script is not successful in identifying the fully qualified host name, you must add the fully qualified host name as the first alias for the host in the /etc/hosts file. The following example shows a host name that is not fully qualified.

paperbark% su
Password:
# /usr/lib/mail/sh/check-hostname
Hostname paperbark could not be fully qualified.
We recommend changing the /etc/hosts entry:

172.16.8.22 paperbark loghost

to:

172.16.8.22 paperbark paperbark.pick.some.domain loghost
#

3.
Use admintool to edit the /etc/hosts file and add the words mailhost and mailhost.domainname after the IP address and system name of the mail hub system.

The domain name must be identical to the subdomain string in the output of the /usr/lib/sendmail -bt -d0 </dev/null command.

The following example shows the output of the command for the system paperbark which is part of the eng.wellard.com subdomain.

paperbark% /usr/lib/sendmail -bt -d0 < /dev/null
Version 8.9.3+Sun
 Compiled with: LDAPMAP MAP_REGEX LOG MATCHGECOS MIME7TO8 MIME8TO7
                NAMED_BIND NDBM NETINET NETINET6 NETUNIX NEWDB NIS NISPLUS
                QUEUE SCANF SMTP USERDB XDEBUG

============ SYSTEM IDENTITY (after readcf) ============
      (short domain name) $w = paperbark
  (canonical domain name) $j = paperbark.eng.wellard.com
         (subdomain name) $m = eng.wellard.com
              (node name) $k = paperbark
========================================================
paperbark%

The following example shows the entry in the /etc/hosts file that designates paperbark as the mail hub for domain eng.wellard.com.

# cat /etc/hosts
#
# Internet host table
#
127.0.0.1       localhost
172.16.8.22     paperbark mailhost mailhost.eng.wellard.com     loghost

4.
Create an entry for the new mail hub in the appropriate hosts file.

If you are using NIS or NIS+, add an entry including a host alias called mailhost and mailhost.domainname to the host entry for the new mail host.

If you are not using NIS or NIS+, create an entry in /etc/hosts for each system on the network, using the format IP:address mailhost_name mailhost mailhost.domainname.

5.
Type cp /etc/mail/main.cf /etc/mail/sendmail.cf and press Return.

The main.cf file is copied to the file sendmail.cf.

# cp /etc/mail/main.cf /etc/mail/sendmail.cf
#

6.
Type pkill -HUP /usr/lib/sendmail and press Return.

sendmail is restarted.

7.
Test your mail configuration.

See “Testing Your Mail Configuration” for instructions on how to test your mail configuration.

Setting Up a Mail Client from a Command Line

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

Use the following steps to set up a Solaris mail client with a mailbox on a mail server.

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 hub on the local /var/mail directory—type servername:/var/mail - /var/mail nfs - yes rw,hard,actimeo=0 and press Return.

You must use the actimeo=0 option or locking of the mailbox files fails.

									server:/var/mail - /var/mail nfs - yes rw,hard,actimeo=0

With an entry in the client system's /etc/vfstab file, the client's mailbox is automatically mounted any time that system is rebooted.

Alternatively, you can edit the /etc/auto_direct file and add an entry like the following one to mount /var/mail automatically.

/var/mail -rw,hard,actimeo=0 server:/var/mail

4.
Type mountall to mount the mailbox.

The client's mailbox is mounted.

5.
Use admintool to edit the /etc/hosts file and add an entry for the mail hub.

This step is not required if you are using a nameservice.

6.
Add the user accounts for the client system to the Aliases database.

See “Creating Mail Aliases” for information on how to create mail aliases for different types of mail configurations.

NOTE

The mail.local 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.

7.
Type pkill -HUP /usr/lib/sendmail and press Return.

sendmail is restarted.

The following example sets up the Solaris system newton as a mail client of the system cinderella.

newton% su
Password:
# mkdir /var/mail
# vi /etc/vfstab
							Add the line:
cinderella:/var/mail  -  /var/mail  nfs  -  yes  rw
# mountall
# pkill -HUP /usr/lib/sendmail
#

Setting Up a Gateway Host

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

For example, a good candidate for a gateway 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 mail hub as the gateway host or to configure another system as the gateway host. You may choose to configure more than one gateway host for your domain. Each gateway 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 gateway host.

NOTE

The procedure for creating a sendmail configuration file is changed in the Solaris 8 Operating Environment. Refer to Chapter 3, “Planning Mail Services,” for instructions.


..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.144.38.24