Rmail operates by default on your primary Rmail file, which is named `~/RMAIL' and receives your incoming mail from your system inbox file. But you can also have other Rmail files and edit them with Rmail. These files can receive mail through their own inboxes, or you can move messages into them with explicit Rmail commands (see section Copying Messages Out to Files).
To run Rmail on a file other than your primary Rmail file, you may use
the i (
rmail-input) command in Rmail. This visits the file
in Rmail mode. You can use M-x rmail-input even when not in
The file you read with i should normally be a valid Rmail file. If it is not, Rmail tries to decompose it into a stream of messages in various known formats. If it succeeds, it converts the whole file to an Rmail file. If you specify a file name that doesn't exist, i initializes a new buffer for creating a new Rmail file.
You can also select an Rmail file from a menu. Choose first the menu
bar Classify item, then from the Classify menu choose the Input Rmail
File item; then choose the Rmail file you want. The variables
rmail-secondary-file-regexp specify which files to offer in the
menu: the first variable says which directory to find them in; the
second says which files in that directory to offer (all those that match
the regular expression). These variables also apply to choosing a file
for output (see section Copying Messages Out to Files).
Each Rmail file can contain a list of inbox file names; you can specify this list with M-x set-rmail-inbox-list RET files RET. The argument can contain any number of file names, separated by commas. It can also be empty, which specifies that this file should have no inboxes. Once a list of inboxes is specified, the Rmail file remembers it permanently until you specify a different list.
As a special exception, if your primary Rmail file does not specify any inbox files, it uses your standard system inbox.
The g command (
rmail-get-new-mail) merges mail into the
current Rmail file from its specified inboxes. If the Rmail file
has no inboxes, g does nothing. The command M-x rmail
also merges new mail into your primary Rmail file.
To merge mail from a file that is not the usual inbox, give the g key a numeric argument, as in C-u g. Then it reads a file name and merges mail from that file. The inbox file is not deleted or changed in any way when g with an argument is used. This is, therefore, a general way of merging one file of messages into another.