System Administration Guide: Network Services

Mailbox Files

A mailbox is a file that is the final destination for email messages. The name of the mailbox can be the user name or the identity of a specific function, such as the postmaster. Mailboxes are in the /var/mail/username file, which can exist either on the user's local system or on a remote mail server. In either instance, the mailbox is on the system to which the mail is delivered.

Mail should always be delivered to a local file system so that the user agent can pull mail from the mail spool and store it readily in the local mailbox. Do not use NFS-mounted file systems as the destination for a user's mailbox. Specifically, do not direct mail to a mail client that is mounting the /var/mail file system from a remote server. Mail for the user, in this instance, should be addressed to the mail server and not to the client host name. NFS-mounted file systems can cause problems with mail delivery and handling.

The /etc/mail/aliases file and name services such as NIS and NIS+ provide mechanisms for creating aliases for electronic mail addresses. So, users do not need to know the precise local name of a user's mailbox.

The following table shows some common naming conventions for special-purpose mailboxes.

Table 14–8 Conventions for the Format of Mailbox Names

Format 

Description 

username

User names are frequently the same as mailbox names. 

Firstname.Lastname Firstname_Lastname Firstinitial.Lastname Firstinitial_Lastname

User names can be identified as full names with a dot (or an underscore) that separates the first and last names. Alternately, user names can be identified by a first initial with a dot (or an underscore) that separates the initial and the last name. 

postmaster

Users can address questions and report problems with the mail system to the postmaster mailbox. Each site and domain should have a postmaster mailbox.

MAILER-DAEMON

sendmail automatically routes any mail that is addressed to the MAILER-DAEMON to the postmaster.

aliasname-request

Names that end in -request are administrative addresses for distribution lists. This address should redirect mail to the person who maintains the distribution list.

owner-aliasname

Names that begin with owner- are administrative addresses for distribution lists. This address should redirect mail to the person who handles mail errors.

owner-owner

This alias is used when no owner-aliasname alias exists for errors to be returned to. This address should redirect mail to the person who handles mail errors. This address also should be defined on any system that maintains a large number of aliases.

local%domain

The percent sign (%) marks a local address that is expanded when the message arrives at its destination. Most mail systems interpret mailbox names with % characters as full mail addresses. The % is replaced with an @, and the mail is redirected accordingly. Although many people use the % convention, this convention is not a formal standard. This convention is referred to as the “percent hack.” This feature is often used to help debug mail problems.

Starting with sendmail version 8, the envelope sender for mail that is sent to a group alias has been changed to the address that is expanded from the owner alias, if an owner alias exists. This change enables any mail errors to be sent to the alias owner, rather than being returned to the sender. With this change, users notice that mail that was sent to an alias looks as if the mail came from the alias owner, when delivered. The following alias format helps with some of the problems that are associated with this change.


mygroup: :include:/pathname/mygroup.list
owner-mygroup: mygroup-request
mygroup-request: sandys, ignatz

In this example, the mygroup alias is the actual mail alias for the group. The owner-mygroup alias receives error messages. The mygroup-request alias should be used for administrative requests. This structure means that in mail sent to the mygroup alias, the envelope sender changes to mygroup-request.