3

So, I can send emails with Emacs now. But reading emails seems to be more difficult task. I want to do it with rmail. This article says that I need to add the following lines:

(setenv "MAILHOST" "pop.openmailbox.org")
(setq rmail-primary-inbox-list '("po:username@openmailbox.org")
      rmail-pop-password-required t)

into my .emacs file. As you can see I'm trying to use my Openmailbox account.

Now, if I execute M-x rmail, after entering my password I see the following message in the echo area:

movemail: Error connecting to POP server: -ERR [AUTH] Plaintext authentication disallowed on non-secure (SSL/TLS) connections.
(No new mail has arrived)
0 new messages read

I'm wondering why I don't have to supply port number (for example I used 587 to send emails) and why do I get this error. How to read emails with Emacs?

3

You need to connect to the server over TLS. In order to do that, you need to add --tls to rmail-movemail-flags. You can use customize to set this variable interactively; if you wish to set it in your init file instead, you can do something like

(setq rmail-movemail-flags '("--tls"))

Note however that Rmail is a fairly primitive mailer. There are better mailers for Emacs, notably Wanderlust (probably the best for IMAP if you wish to keep all your mail on the server), Mew, VM, mu4e, notmuch, etc. Some people also like to use Gnus, the Emacs newsreader, for reading mail.

  • What should be contents of rmail-movemail-flags a list of symbols, list of strings, string? I used '(--tls) and Emacs says "Wrong type argument: stringp, --tls". I tried C-h v rmail-movemal-flags but it does not explain format of data that this variable should hold. – Mark Karpov Nov 9 '14 at 16:17
  • With '("--tls") it's a bit better: invalid option -- '-'. But still doesn't work. – Mark Karpov Nov 9 '14 at 16:26
  • I've updated my answer to mention that you should use customize which will pick the right datatype for you. The issue you're having with invalid option is a different one — you've probably got obsolete versions of movemail lying around, and Emacs is picking the wrong one. Either uninstall your obsolete Emacs versions, or set rmail-movemail-program to something sane. – jch Nov 9 '14 at 16:34
  • Thanks for your help, although I'm still unable to make it work. I'm completely perplexed. I read various manuals, try all possible combinations, but now I don't even get that first message, but just 'authentication failed'. I don't know what people mean by user name 'username' or 'username@openmailbox.org' and what is meant by host 'openmailbox.org' or 'pop.openmailbox.org'. I tried all combinations and I'm really tired. I seems to be impossible to read emails with Emacs. I'll try later again... – Mark Karpov Nov 9 '14 at 17:34
  • @Mark, many of us read emails in Emacs but I personally don't know anybody that still uses email. Try mu4e, mew, wanderlust or just gnus. You still need to know your 'username' and mail host/port though... – rimero Nov 10 '14 at 4:14
0

I have used RMAIL for the past fifteen years or so (and I think there are highly respected persons on gnu.emacs.help who do). What I always did was have an external script get the mail from the POP server (I do not use IMAP) and write it to a spool file, say ~/mail/spool/inbox.

Then,

(setq rmail-primary-inbox-list '("~/mail/spool/inbox"))

is enough for RMAIL to find the mail. I use a self-written Perl script to do the fetching, but there must be tried-and-testing programs around (there used to be a program called fetchmail - I do not know if that is still an option. Movemail is really an external program that comes with Emacs. I am not sure if movemail does the same as fetchmail, but the above pretty much sounds like it, and that it is called from within Rmail.).

RMAIL can be a little confusing at first because there are so many possibilities of how you can use it. On the other hand, I have always been completely happy with it because of its simplicity -- I still do not even make use of all its functionality.

It is also important to note that Rmail is not "a mailer", but only a mode for reading and keeping mail. It can call a different mode for writing and sending mail, but there are also different choices available for that. Again, I use the most old-fashioned and simple one, by setting

(setq mail-user-agent 'sendmail-user-agent)

(The default is now a mode called message-mode.)

If you do wish to use Rmail, and these tips do not help you, you might want to ask for help on gnu.emacs.help. Some very impressive authorities read this list and very often provide helpful answers. The Rmail info page (C-h i m Emacs m Rmail) also explains that there is also an independent movemail program available (part of 'mailutils'), which has additional options. If the plain vanilla movemail (the one which comes with Emacs) does not work for some reason, maybe the mailutils one can.

The bottom line is: Rmail works. It sometimes requires some fiddling, but once it works, it works.

Best regards,

Florian

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.