Gnus + Gmail

Filed under:Administração Linux — posted by rwanderley on 17 January, 2008 @ 11:50 am

Here I’ll try to show how to configure Gnus to connect to your gmail account so you can read and send your e-mails without having to leave your Emacs :-) If you have multiple IMAP accounts I also tell you how to configure Gnus for multiple IMAP account, the same thing can be done for POP accounts, though I don’t mention POP here.

All the stuff here are slightly modified configurations found at the EmacsWiki

Every time you load gnus with the commands M-x gnus or M-x gnus-other-frame it reads the file ~/.gnus, so, all configurations mentioned here should be added to this file.

So, beginning the configuration process let’s configure our Gnus so it can fetch e-mails from your Gmail account:

(setq gnus-select-method '(nnimap "gmail"
          (nnimap-address "imap.gmail.com")
          (nnimap-server-port 993)
                                  (nnimap-stream ssl)))

This is all you need to start reading your e-mails with Gnus, note that you will have to have gnutls package installed in order to use ssl.

To test this type M-x gnus, it should ask for your login, type yourusername@gmail.com than type your password. After that you should be redirected to the *Group* buffer, type U and subscribe to your Gmail folders. There are lot’s of options, too many to be mentioned here, please read the EmacsWiki for more information.

In order to not have to be typing your account and password you can edit a file called ~/.authinfo and add something like this:


machine imap.gmail.com login myaccount@gmail.com password mypassword port 993
machine smtp.gmail.com login myaccount@gmail.com password mypassword port 587

Change myaccount and mypassword to your account and password. The smtp line will be use for sending mail.

To add another IMAP account use the gnus-secondary-select-methods variable like this:

(setq gnus-secondary-select-methods
      '((nnimap "AnotherAccount"
    (nnimap-address "imap.something.com")
    (nnimap-server-port 993)
    (nnimap-stream ssl))))

TODO: send mail using multiple smtp servers

zero comments so far »

Please won't you leave a comment, below? It'll put some text here!

Copy link for RSS feed for comments on this post or for TrackBack URI

Leave a comment

Line and paragraph breaks automatic, e-mail address never displayed, HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>

(required)

(required)




image: detail of installation by Bronwyn Lace