### 4.3 Multiple Folders

IMAIL operates by default on your primary folder, which is the folder named ‘`inbox`’ on your IMAP server. Your incoming mail is placed in that folder by your system’s mail-delivery software. Whenever it has an open connection to the server, IMAIL notices new mail and brings it to your attention by modifying the Edwin mode line.

You can specify a different folder to be your primary folder by modifying one or more of IMAIL’s variables. The simplest way to do this is to change the variable `imail-primary-folder` to contain the URL of the folder that you wish to be your primary folder. Normally `imail-primary-folder` is `#f`, in which case the primary folder has the form

    imap://user-id@server/mailbox

where user-id is the value of the variable `imail-default-user-id`, server is the value of `imail-default-imap-server`, and mailbox is the value of `imail-default-imap-mailbox`. `imail-default-user-id` may be `#f` meaning to use the value of ‘`(current-user-name)`’.

In addition to the primary folder, you can also have other folders and edit them with IMAIL. You can move messages into them with explicit IMAIL commands.8

One major difference between a file-based mail reader like Rmail and an IMAP mail reader like IMAIL is that file-based mail readers do not need to provide commands to manipulate mail files (as opposed to mail messages). This is because ordinary file-system commands already provide the ability to copy, delete, and rename such files. This isn’t the case for IMAP mail readers. Consequently IMAIL provides a basic set of commands for manipulating folders, as well as a Dired-like folder browser.

#### Footnotes

### (8)

While Emacs Rmail additionally supports the ability to retrieve mail from “system inboxes” on your local computer (usually `/var/spool/mail/USER` on unix systems), IMAIL does not. IMAIL only supports incoming mail when it is delivered to an IMAP server. This Rmail feature can easily be implemented if desired, but there has been no call for it.