Next: , Previous: , Up: Rmail   [Contents][Index]

33.19 Retrieving Mail from Remote Mailboxes

Some sites use a method called POP for accessing users’ inbox data instead of storing the data in inbox files. By default, the Emacs movemail can work with POP (unless the Emacs configure script was run with the option ‘--without-pop’).

Similarly, the Mailutils movemail by default supports POP, unless it was configured with the ‘--disable-pop’ option.

Both versions of movemail only work with POP3, not with older versions of POP.

No matter which flavor of movemail you use, you can specify a POP inbox by using a POP URL (see Movemail). A POP URL is of the form ‘pop://username@hostname’, where hostname is the host name or IP address of the remote mail server and username is the user name on that server. Additionally, you may specify the password in the mailbox URL: ‘pop://username:password@hostname’. In this case, password takes preference over the one set by rmail-remote-password (see below). This is especially useful if you have several remote mailboxes with different passwords.

For backward compatibility, Rmail also supports an alternative way of specifying remote POP mailboxes. Specifying an inbox name in the form ‘po:username:hostname’ is equivalent to ‘pop://username@hostname’. If you omit the :hostname part, the MAILHOST environment variable specifies the machine on which to look for the POP server.

Another method for accessing remote mailboxes is IMAP. This method is supported only by the Mailutils movemail. To specify an IMAP mailbox in the inbox list, use the following mailbox URL: ‘imap://username[:password]@hostname’. The password part is optional, as described above.

Accessing a remote mailbox may require a password. Rmail uses the following algorithm to retrieve it:

  1. If a password is present in the mailbox URL (see above), it is used.
  2. If the variable rmail-remote-password-required is nil, Rmail assumes no password is required.
  3. If the variable rmail-remote-password is non-nil, its value is used.
  4. Otherwise, Rmail will ask you for the password to use.

If you need to pass additional command-line flags to movemail, set the variable rmail-movemail-flags a list of the flags you wish to use. Do not use this variable to pass the ‘-p’ flag to preserve your inbox contents; use rmail-preserve-inbox instead.

The movemail program installed at your site may support Kerberos authentication (the Emacs movemail does so if Emacs was configured with the option --with-kerberos or --with-kerberos5). If it is supported, it is used by default whenever you attempt to retrieve POP mail when rmail-remote-password and rmail-remote-password-required are unset.

Some POP servers store messages in reverse order. If your server does this, and you would rather read your mail in the order in which it was received, you can tell movemail to reverse the order of downloaded messages by adding the ‘-r’ flag to rmail-movemail-flags.

Mailutils movemail supports TLS encryption. If you wish to use it, add the ‘--tls’ flag to rmail-movemail-flags.

Next: , Previous: , Up: Rmail   [Contents][Index]