Organizing mail

Use folders to save messages in an organized fashion.

You can create as many folders as you need. Give each folder a name that pertains to the subject matter of the messages it contains, similar to file folders in an office filing system. Each folder is a text file that 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. When the directory exists, the mail program creates the folders in that directory as needed. If you do not specify a directory with the set folder option in your .mailrc file, the folder is created in your current directory. Using the mail program, you can put a message into a folder from the system mailbox, a personal mailbox, or another folder.

You can add the contents of a message to a file or folder using the s or w subcommands. Both of these subcommands append information to an existing file or create a new file if it does not exist. Information currently in the file is not destroyed. If you save a message from your system mailbox to a file or folder, the message is deleted from your system mailbox and transferred to the file or folder specified. If you save a message from your personal mailbox or folder to another file or folder, the message is not deleted from your personal mailbox but is copied to the specified file or folder. When using the s subcommand, you can read the folder like a mailbox because the messages and the header information are appended at the end of the folder. When using the w subcommand, you can read the folder like a file because the message is appended without header information at the end of the file.

Before organizing mail, ensure that the following requirements are met:

  1. The mail program must be installed on your system.
  2. There must be mail in your system mailbox, personal mailbox, or a folder you have defined.
  3. The mail program must be started.