Difference between revisions of "Emacs RMAIL with CalMail"

From UCB Math Wiki
Jump to: navigation, search
m (Using Emacs for mail)
Line 19: Line 19:
  
 
This works with emacs on my linux workstation, which is emacs version 21.  In emacs version 22, it should in principle be possible to configure RMAIL directly to get mail from the IMAP server, without the '''fetchmail''' workaround.  However, this also requires that the GNU mailutils version of RMAIL's helper program '''movemail''' be available.  Currently, the latter is only installed on the Solaris systems.
 
This works with emacs on my linux workstation, which is emacs version 21.  In emacs version 22, it should in principle be possible to configure RMAIL directly to get mail from the IMAP server, without the '''fetchmail''' workaround.  However, this also requires that the GNU mailutils version of RMAIL's helper program '''movemail''' be available.  Currently, the latter is only installed on the Solaris systems.
 +
 +
--Mark Haiman

Revision as of 17:33, 9 April 2009

Using Emacs for mail

I'm a die-hard user of emacs for mail. Here's one possible way to make it work with CalMail.

Sending mail from emacs (on a math department machine) should not require any changes.

Reading mail in RMAIL mode can be done by setting up RMAIL to use fetchmail before getting new mail, as follows.

1. Follow the initial setup instructions for fetchmail on the CalMail conversion and Unix mail page.

2. In your .emacs file, put the lines:

(defun rmail-run-fetchmail nil (shell-command "fetchmail -k"))
(setq rmail-before-get-new-mail-hook 'rmail-run-fetchmail)
(setq rmail-primary-inbox-list (list (expand-file-name "~/inbox")))

Here I assume you configured fetchmail to put mail in the file "inbox" as in the example on the instructions page.

The shell command fetchmail -k on the first line above will leave a copy of your mail on the server. If you want it deleted from the server instead, drop the -k.

This works with emacs on my linux workstation, which is emacs version 21. In emacs version 22, it should in principle be possible to configure RMAIL directly to get mail from the IMAP server, without the fetchmail workaround. However, this also requires that the GNU mailutils version of RMAIL's helper program movemail be available. Currently, the latter is only installed on the Solaris systems.

--Mark Haiman