Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I generally like Gmail, but there's something about well formatted, color highlighted plain text over a black background that appeals to me a lot. I'd like to be able to use Emacs to read/send email using my Gmail account, but setting it up is infuriatingly difficult. I tried a bunch of extensions and tutorials, but none of them gave me a fully working email setup for Emacs.

This is going to be my last try before I give up. I'm on Ubuntu 11.10, standard Unity shell, using Emacs 23.3. Please tell me once and for all how to get this to work.

share|improve this question
up vote 2 down vote accepted

Gnus seems to have some instructions for GMail. Using IMAP is probably best since it leaves mail accessible with other clients and the web interface if something goes wrong locally.

share|improve this answer

I use offlineimap + dovecot for having the mails localy.

My .offlineimaprc is:

accounts = Locals, Gmail
maxsyncaccounts = 2

[Account Gmail]
localrepository = Local
remoterepository = Remote
autorefresh = 5

[Repository Local]
type = Maildir
localfolders = ~/Maildir

[Repository Remote]
type = Gmail
remotehost =
remoteuser =

My /etc/dovecot.conf contain:

default_mail_env = maildir:%h/Maildir

and my .gnus have:

(setq imap-shell-program "/usr/lib/dovecot/imap")

(setq gnus-secondary-select-methods
      '((nndraft "")
        (nnimap "localhost"
         (nnimap-stream shell)))))

For outgoing mail I use:

(setq send-mail-function 'smtpmail-send-it)
(setq message-send-mail-function 'smtpmail-send-it)
(setq smtpmail-starttls-credentials '(("" 587 nil nil)))
(setq smtpmail-auth-credentials '(("" 587 "" nil)))
(setq smtpmail-default-smtp-server "")
(setq smtpmail-smtp-server "")
(setq smtpmail-smtp-service 587)

And it just work.

share|improve this answer
I installed dovecot and it warned me that its "conf file does not belong to the current user". Not sure what to do with this. Also, I couldn't find the imap shell program. There's no imap file in /usr/lib/dovecot – EpsilonVector Dec 8 '11 at 6:52
I don't know how you installed dovecot. I use Debian, and the dovecot package from debian unstable (package dovecot-imapd) – Rémi Dec 8 '11 at 18:57

wl does the job too


share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .