Platform Notes: SPARCstation Voyager Software Guide

sendmail Configuration

Edit the sendmail files if you use more than one kind of mail user interface: only if you are not exclusively using a nomadic mail tool.

The sendmail utility is the back end to most of the mail user interface programs such as mailtool and mailx and is responsible for sending mail to remote hosts using the Simple Mail Transport Protocol (SMTP).

The sendmail utility is not affected when the network is disconnected. Most local mail processing can still be accomplished. The front end mail user interface programs will still operate and can still read, delete, copy and move mail messages in the system's inbox (/var/mail/username) as well as in any local mail folders. You cannot, of course, send mail or receive it from remote systems.

With minor changes to a few files, outgoing mail can be composed and sent from a user interface program, and sendmail will queue the mail until the network connection is established or until a queue timeout period (the default is three days) is exceeded, but only if the full address of the recipient can be determined (either because the original mail contains the full address or because it contains a mail alias that can be expanded to the full address).

Remote Mail Host

A remote mail host is another host through which sendmail routes all outgoing mail. When your system is connected to the network, mail will take an extra hop to the mail host before it is delivered. When your system is disconnected, a remote mail host provides automatic queueing of new mail messages until the network is reconnected. This means you can still compose and "send" mail messages when disconnected. The messages will be delivered to the remote mail host shortly after reconnection.

Configuring the Remote Mail Host

To configure a remote mail host, in /etc/inet/hosts, append the word mailhost to an entry that specifies a permanently networked host. The mail host can be any host that is always available to the core network that the SPARCstation Voyager is usually connected to. See the last line in Example 5-1 for an example specification of a mail host.

Mail Aliases

The sendmail utility uses the name service aliases map to expand a mail alias into a fully specified address. If mail is sent to a username, but that name cannot be found in the aliases database, the mail is delivered to the local machine if username can be found in the /etc/passwd file, or it is returned to the sender with a "User Unknown" error message.

When disconnected from the network, or when the alias map is only present in the files name service (as recommended earlier), you must specify mail recipient names to assure delivery. For convenience, you may enter aliases for the people or mail lists you frequently send mail to in the /etc/mail/aliases file.


amy: amy@travails
andrew: andrew@telco.com
bob: bob.roberts@therally
clark: clark@phonebooth
deskset: deskset@thehouse
jim: jim@cosmos
lyn: lynda@flanders
melissa: mfields@home
nomadics: nomadics@server.Corp
our-staff: myboss@hismachine
susan: susan@ct.amber.com
trish: trussell@bambus.COM

It is not necessary to remember, or otherwise determine, the fully specified name for people (or mail lists) who are not listed in the /etc/mail/aliases file. You can send mail to them by addressing it to user@mailhost where mailhost is the name of the mail host you defined earlier (for example, user@cosmos).


Note -

Do not use the actual word mailhost in the host part of the address since that can cause your mail to be misdirected.


You may address your mail to user@domain if your site uses DNS (e.g. jsmith@eng or jsmith@some.com).

Sometimes when an alias cannot be expanded, the mail is delivered to the local machine. This usually occurs because the cache in sendmail becomes unsynchronized with the actual configuration of the system. It may not happen very often or even at all, but occasionally it is a good idea to inspect the /var/mail directory for lost mail.

Queue Limits

As stated earlier, the default maximum time that an undelivered mail message is queued is three days. If your system is disconnected for longer than three days, mail will be returned to the sender. You can change the maximum queue time by changing the following lines in the /etc/mail/sendmail.cf file from:


# return queued mail after this long
OT3d

to:


# return queued mail after this long 
OT999d

In this example, mail will be queued for 999 days before being returned to the sender. See the sendmail man page for a more complete explanation of the values for the queued mail timeout parameter.