Hello, Attached is a patch that improves the interaction of rmail.el with movemail from GNU mailutils. The most important features of this version of movemail are: * Support for a wide variety of mailbox formats, including imap for remote mailboxes. The retrieval of the mail from remote servers can be carried over a TLS encrypted channel. * Support for a wide variety of locking schemes. * NLS support * It is backward-compatible with the native Emacs movemail The attached patch automatically detects which flavor of movemail is in use: native Emacs or GNU mailutils. Unless the variable rmail-movemail-program is set, it looks for the movemail program in a list of directories composed of rmail-movemail-search-path, exec-path and exec-directory. If the GNU mailutils movemail is being used, rmail.el allows to use 'imap://' and 'pop://' URLs in rmail-primary-inbox-list and properly recognizes them as remote mailboxes. It also starts movemail with --emacs flag, thereby enabling special emacs-interaction mode. This is necessary since movemail is fully internationalized, like the rest of GNU mailutils, and but the current way of discerning authentication failures by rmail.el is based on matching the program output against a set of regular expressions. It is hardly feasible to pack every possible translation of the error message into this regexp. To overcome this difficulty, while still providing national language support, GNU mailutils movemail has a special emacs-interaction mode. In this mode it first outputs an abbreviated MU-specific error code, which can easily be used in a regexp, and then the detailed explanation of the error in current locale. The patch has been tested with the CVS version of GNU mailutils. Just as an example, here is the setup I use: (setq rmail-primary-inbox-list (list "imap://gray@hostname.farlep.net")) (setq rmail-movemail-flags (list "--tls")) (setq rmail-movemail-search-path (list "~/gnu/mailutils/movemail")) (setq rmail-movemail-program nil) (setq rmail-pop-password-required t rmail-preserve-inbox t) ChangeLog entry follows: 2004-11-18 Sergey Poznyakoff * mail/rmail.el: Updated to work with movemail from GNU Mailutils (rmail-pop-password,rmail-pop-password-required) (rmail-set-pop-password): Updated docstring (rmail-get-pop-password): Take an argument specifying whether it is POP or IMAP mailbox we are using. (rmail-pop-password-error): Added mailutils-specific error message (rmail-movemail-search-path) (rmail-movemail-variant-in-use): New variables. (rmail-probe,rmail-autodetect,rmail-movemail-variant-p): New functions (rmail-get-new-mail): Updated for use with GNU mailutils movemail I'll appreciated any feedback. Regards, Sergey