Next: Remote Mailboxes, Previous: Rmail Rot13, Up: Rmail [Contents][Index]

### 33.18 `movemail` program

Rmail uses the `movemail` program to move mail from your inbox to your Rmail file (see Rmail Inbox). When loaded for the first time, Rmail attempts to locate the `movemail` program and determine its version. There are two versions of the `movemail` program: the native one, shipped with GNU Emacs (the Emacs version) and the one included in GNU mailutils (the mailutils version, see movemail in GNU mailutils). They support the same command line syntax and the same basic subset of options. However, the Mailutils version offers additional features.

The Emacs version of `movemail` is able to retrieve mail from the usual Unix mailbox formats and from remote mailboxes using the POP3 protocol.

The Mailutils version is able to handle a wide set of mailbox formats, such as plain Unix mailboxes, `maildir` and `MH` mailboxes, etc. It is able to access remote mailboxes using the POP3 or IMAP4 protocol, and can retrieve mail from them using a TLS encrypted channel. It also accepts mailbox arguments in URL form. The detailed description of mailbox URLs can be found in URL in Mailbox URL Formats. In short, a URL is:

    proto://[user[:password]@]host-or-file-name

where square brackets denote optional elements.

proto

  Specifies the mailbox protocol, or format to use. The exact semantics of the rest of URL elements depends on the actual value of proto (see below).

user

  User name to access the remote mailbox.

password

  User password to access the remote mailbox.

host-or-file-name

  Hostname of the remote server for remote mailboxes or file name of a local mailbox.

Proto can be one of:

`mbox`

  Usual Unix mailbox format. In this case, neither user nor pass are used, and host-or-file-name denotes the file name of the mailbox file, e.g., `mbox://var/spool/mail/smith`.

`mh`

  A local mailbox in the MH format. User and pass are not used. Host-or-file-name denotes the name of MH folder, e.g., `mh://Mail/inbox`.

`maildir`

  A local mailbox in the maildir format. User and pass are not used, and host-or-file-name denotes the name of `maildir` mailbox, e.g., `maildir://mail/inbox`.

`file`

  Any local mailbox format. Its actual format is detected automatically by `movemail`.

`pop`

  A remote mailbox to be accessed via POP3 protocol. User specifies the remote user name to use, pass may be used to specify the user password, host-or-file-name is the name or IP address of the remote mail server to connect to; e.g., `pop://smith:guessme@remote.server.net`.

`imap`

  A remote mailbox to be accessed via IMAP4 protocol. User specifies the remote user name to use, pass may be used to specify the user password, host-or-file-name is the name or IP address of the remote mail server to connect to; e.g., `imap://smith:guessme@remote.server.net`.

Alternatively, you can specify the file name of the mailbox to use. This is equivalent to specifying the ‘`file`’ protocol:

    /var/spool/mail/user ≡ file://var/spool/mail/user

The variable `rmail-movemail-program` controls which version of `movemail` to use. If that is a string, it specifies the absolute file name of the `movemail` executable. If it is `nil`, Rmail searches for `movemail` in the directories listed in `rmail-movemail-search-path`, then in `exec-path` (see Shell), then in `exec-directory`.

Next: Remote Mailboxes, Previous: Rmail Rot13, Up: Rmail [Contents][Index]