Email

You’ll find many tools for sending and receiving email in Solaris. Some are used from the command line; others are GUI based and can only be used in a windowing system like CDE. Before we can start sending and receiving email, we need to set up the email services in Solaris.

Setting Basic Mail Services

Each user should have a mailbox either on his local system in the / var/mail directory or on a central system called a mail server. In addition, each user also should have a mail alias in the / etc/mail/aliases file, which points to the location of the mailbox.

Note

Make sure the / var file system is large enough to hold all of the email. See Chapter 6, “Installing the Solaris 9 Software,” for a discussion on sizing the /var file system.


Start with setting up a mail server. Identify the server that will be the mail server and share the /var/mail directory on that system so that other systems can mount it. (See Chapter 22, “The NFS Environment,” for details on how to share and mount remote file systems.) Also make sure that your other systems know about the mailhost by making an entry in each system’s /etc/hosts file, as follows:

192.168.0.253    ultra5 mailhost 

The word mailhost is added as an alias next to the hostname of the system that will serve as the mail server.

Note

This is a simple setup procedure for a mail server. The system will not utilize a name service or automounter, and email will only be routed on the local network.


Every system that will be receiving mail from the mail server is called a mail client. At each mail client, mount the local /var/mail directory to the / var/mail directory on the mailhost. See Chapter 22 for details on how to mount a remote file system.

Aliases can be used to enable a user to receive mail under different names. For example, you might want to set up an alias so that all mail sent to postmaster gets routed to the root account. There is no need to set up individual accounts for each of these names; you just need to make these entries in the /etc/mail/aliases file, as follows:

postmaster:root 

You can have an alias name refer to a distribution list, as follows:

Programmers: wcalkins, sburge, bholzgen 

You can also append a hostname to the username to specify a user on a given system, as follows:

bill:wcalkins@ultra5 

The Solaris mail facility, sendmail, does not read the / etc/mail/aliases file directly; it uses the binary files named aliases.dir and aliases.pag. Therefore, after creating entries in the /etc/mail/aliases file, you need to update the binary files by typing the following:

newaliases <cr> 

The sendmail daemon will start up by default at bootup (using default settings) via the /etc/rc2.d/S88sendmail script. For more information on sendmail configuration, refer to the book titled sendmail published by O’Reilly.

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

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