[ Previous | Next | Contents | Glossary | Home | Search ]
AIX Version 4.3 System User's Guide: Communications and Networks

Storing Mail

Mail is stored in different ways, depending on the specific situation. The mail program uses the following types of mailboxes or folders:

System Mailbox

The system mailbox is similar to a post office box: the post office delivers letters addressed to the person who owns that box. Similarly, the system mailbox is a file where messages are delivered to a particular user. If the file does not exist when mail arrives, it is created. The file is deleted when all messages have been removed.

System mailboxes reside in the /var/spool/mail directory. Each system mailbox is named by the user ID associated with it. For example, if your user ID is karen , your system mailbox is

/var/spool/mail/karen

When mail arrives for your user ID, the mail is placed in your system mailbox. Depending on the shell defined with the SHELL environment variable, the shell checks for new mail and issues a message. The default message is similar to:

YOU HAVE NEW MAIL

Default Personal Mailbox

Your personal mailbox is similar to an in-basket in an office. You put mail in the in-basket after you have received it, but before you have filed it.

Each user has a personal mailbox. When you read mail from the system mailbox, if it is not marked for deletion or saved to a file, it is written to your personal mailbox, $HOME/mbox ($HOME is your login directory). The mbox file exists only when it contains a message.

dead.letter File

If you need to interrupt a message you are creating to complete other tasks, the system saves incomplete messages in the dead.letter file in the $HOME directory. If the dead.letter file does not exist, the file is created. Later you can edit the file to complete your message.

Attention: Do not use the dead.letter file to store messages. The content of this file is overwritten each time an interrupt is issued to save a partial message to the dead.letter file.

Folders

Folders enable you to save messages in an organized fashion. Using the mail program, you can put a message into a folder from the system mailbox, a personal mailbox and another folder.

Each folder is a text file. Each folder is placed in the directory you specify in your .mailrc file with the set folder option. You must create this directory before using folders to store messages. Once the directory exists, the mail program creates the folders in that directory as needed. If you do not specify a directory in your .mailrc file, folders are created in the current directory. See "Organizing Mail".

Note: Several programs are available to send and receive mail, including Message Handler (MH), and bellmail program. Which program you use depends on what is installed and configured on your system. For information on your system configuration, contact your system administrator.

Related Information

Mail Command and Subcommand Summary

Organizing Mail

The .mailrc file format

The /etc/passwd file

The mail command and the bellmail command start the mail program


[ Previous | Next | Contents | Glossary | Home | Search ]