VM User's Manual. Node: POP Spool Files

prev UP Spool Files next

1.2: POP Spool Files

VM supports accessing spool files on remote hosts via the Post Office Protocol (POP). Instead of a spool file name in the examples above, you would use a string that tells VM how to access the POP mailbox. The format of this string is:


HOST is the host name of the POP server. PORT is the TCP port number to connect to (should normally be 110). USER is the user name sent to the server. PASSWORD is the secret shared by you and the server for authentication purposes. How is it used depends on the value of the AUTH parameter. If the PASSWORD is `*', VM will prompt you for the password the first time you try to retrieve mail from the maildrop. If the password is valid, VM will not ask you for the password again during this Emacs session.

AUTH is the authentication method used to convince the server you should have access to the maildrop. Acceptable values are `pass', `rpop' and `apop'. For `pass', the PASSWORD is sent to the server with the POP PASS command. For `rpop', the PASSWORD should be the string to be sent to the server via the RPOP command. In this case the string is not really a secret; authentication is done by other means. For `apop', an MD5 digest of the PASSWORD appended to the server timestamp will be sent to the server with the APOP command. In order to use `apop' you will have to set the value of vm-pop-md5-program appropriately to point at the program that will generate the MD5 digest that VM needs.

By default VM will retrieve all the messages from a POP maildrop before returning control of Emacs to you. If the maildrop is large, the wait could be considerable. If you set vm-pop-max-message-size to a positive numeric value, VM will not automatically retrieve messages larger than this size. If VM is retrieving messages because you invoked vm-get-new-mail interactively, then VM will ask whether it should retrieve the large message. If VM is retrieving messages automatically (e.g. vm-auto-get-new-mail is set non-nil) then VM will skip the large message and you can retrieve it later.

The variable vm-pop-messages-per-session controls how many messages VM will retrieve from a POP maildrop before returning control to you. Similarly, the variable vm-pop-bytes-per-session limits the number of bytes VM will retrieve from a POP maildrop before returning control to you. By default, the value of both variables is nil, which tells VM to retrieve all the messages in the POP maildrop regardless of how many messages there are and how large the maildrop is.

After VM retrieves messages from the maildrop, the default action is to delete the messages from there. If you want VM to leave messages in the remote maildrop until you explicitly request their removal, set vm-pop-expunge-after-retrieving to nil. Messages will not be removed from the maildrop until you run vm-expunge-pop-messages; only those messages that VM has retrieved into the current folder will be expunged.

The variable vm-pop-auto-expunge-alist gives you a way to specify on a per-maildrop basis which POP maildrops have message automatically removed when retrieved and which ones leave the messages on the POP server. The value of vm-pop-auto-expunge-alist should be a list of POP mailboxes and values specifying whether messages should be automatically deleted from the mailbox after retrieval. The format of the list is:


MAILBOX should be an POP maildrop specification as described in the documentation for the variable vm-spool-files. If you have the POP password specified in the vm-spool-files entry, you do not have to specify it here as well. Use `*' instead; VM will still understand that this mailbox is the same as the one in vm-spool-files that contains the password.

VAL should be nil if retrieved messages should be left in the corresponding POP mailbox, t if retrieved messages should be removed from the mailbox immediately after retrieval.

Here is an example:

(setq vm-pop-auto-expunge-alist
     ("odin.croc.net:110:pass:kyle:*" . nil)  ;; leave message on the server
     ("hilo.harkie.org:110:pass:kyle:*" . t)  ;; expunge immediately
prev UP Spool Files next