help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: reading mail with emacs


From: Robert Thorpe
Subject: Re: reading mail with emacs
Date: Wed, 13 Aug 2014 02:18:02 +0100

"visaris tds.net" <address@hidden> writes:

> Whereas I have been reading mail with emacs for decades, I did a new install
> (I'm a gentoo user) and now what once automagically worked nolonger does...
> Emacs seems to function -- exept for mail.
>
> Although I have fethcmail and exim running, and although mail does
> arive in /var/spool/exim/input, the format is that each message is split
> into
> a header file and then the body of the message.
>
> M-x rmail does not get mail from  /var/spool/exim/input.

Did you post about this to the Emacs Reddit group recently?  As someone
else wrote there /var/spool/exim/input is Exim's *input* spool file.
It's where Exim puts emails before they are delivered.  As far as I
understand it Exim is not designed to have users get stuff from that
directory.  In the past it may have only worked by coincidence, because
older versions of Exim stored stuff in some format that movemail
understands.

> I have spent much time chasing cryptic pointers reading unintelligable
> documents making vague references to "movemail" but it is beyond me.
> I have contemplated perusing the RMAIL file and comparing it with
> contents of /var/spool/exim/input so as to increase the chance that I can
> make some lucky guesses and write a c program to bridge the gap from
> /var/spool/exim/input to RMAIL.  Surely emacs has not deteriated to the
> point that this would be necessary.  I find it difficult to believe there
> is not
>  some simple way to proceed.

"Movemail" fulfills two purposes.  Firstly, it moves mails between
different places on one system.  It can take mail from the spool file(s)
to a mbox file in the user's home directory.  (If the spool file is in
MH or Maildir format it can translate that to mbox).  Secondly, it can
act rather like fetchmail, it can download mails from an IMAP or POP
server and copy them to a mbox file in the user's home directory.

After movemail has done it's thing rmail itself takes over.  Rmail is
really just a viewer for mbox files.  Rmail runs movemail automatically,
there's no need to run it manually.

If you have an MTA setup then it's normal to use it in the first way.
The MTA puts mail in a spool file.  Then when you do M-x rmail it calls
movemail which moves it to the "RMAIL" file in your home directory.
That's what happens if you set the MAIL environment variable to your
spool file.  If you want to make that approach work you need to figure
out Exim (I find its manual baffling).  One way that could work is to
use the LMTP transport of Exim to communicate with a mail delivery
program such as maidag or maildrop.  Those programs put mail into spool
files for users to access.  In this case you'll have:
fetchmail(MRA)->Exim(MTA)->Maidag(MDA)->SpoolFile->movemail->rmail.

Alternatively, you can bring mail directly from your IMAP or POP server
using movemail.  That's what I do, I don't run an MTA on my PC at all, I
deliver using Emac's smtpmail library.  To do this do something like:
(setq send-mail-function 'smtpmail-send-it)
(setq smtpmail-smtp-server "smtp.yourisp.com")
(setq rmail-primary-inbox-list
  '("imap://yourlogin:address@hidden"))

To use IMAP you need the version of movemail in the GNU mailutils
package.  The one that comes with Emacs only supports POP.

BR,
Robert Thorpe



reply via email to

[Prev in Thread] Current Thread [Next in Thread]