37.20 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. The
movemail can work with POP if you compile it with the macro
MAIL_USE_POP defined. (You can achieve that by specifying
‘--with-pop’ when you run
configure during the
installation of Emacs.)
Mailutils movemail by default supports POP, unless configured
with ‘--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
POP inbox by using POP URL (see Movemail). A POP
URL is a “file name” of the form
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. This is especially useful if you have
several remote mailboxes with different passwords.
For backward compatibility Rmail also supports two alternative ways
of specifying remote POP mailboxes. Specifying inbox name in the form
‘po:username:hostname’ is equivalent to
‘pop://username@hostname’. Alternatively, you may set
a “file name” of ‘po:username’ in the inbox list of an
Movemail will handle such a name by opening a
connection to the POP server. The MAILHOST environment variable
will in this case specify the machine to look for the server on.
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:
password part is optional, as described above.
Accessing a remote mailbox may require a password. Rmail uses the
following algorithm to retrieve it:
- If the password is present in mailbox URL (see above), it is
- If the variable
rmail-remote-password is non-
value is used.
- Otherwise, if
rmail-remote-password-required is non-
then Rmail will ask you for the password to use.
- Otherwise, Rmail assumes no password is required.
For compatibility with previous versions,
rmail-pop-password-required may be used instead of
If you need to pass additional command-line flags to
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
movemail program installed at your site may support
Kerberos authentication. If it is
supported, it is used by default whenever you attempt to retrieve
POP mail when
rmail-pop-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
Mailutils movemail supports TLS encryption. If you wish to
use it, add the ‘--tls’ flag to