koldfront

Gnus email IMAP

It can be practical to store email on a server and access it via IMAP - that way you can use it from different computers and different programs.

Recent versions of Gnus have had the IMAP part revamped for improved speed.

Table of contents

Configuration

Configuring IMAP means adding to the select methods we set up in the beginning of this tutorial; so I change ~/.gnus like this:

; Get local email, and store it in nnml; connect via IMAP to imap.mcom.com:
(setq gnus-secondary-select-methods '((nnml "")
                                      (nnimap "imap.mcom.com")))

To avoid being prompted for username and password all the time, I create the file ~/.authinfo with the content:

machine imap.mcom.com login asjo@mcom.com password MyPassword port imap

I won't set up splitting for IMAP in the beginning. When I get comfortable with IMAP, I'll add it.

Ok, lets try it out - start up Gnus with M-x gnus and use ^ to go from the *Group* buffer to the *Server* buffer. You'll see something like this:

Gnus *Server* buffer

Move the cursor down to the IMAP-server and press RET - now you get a list of groups on the imap-server, and you can subscribe/unsubscribe to the using u.

List of groups

Note how Gnus automatically subscribes you to all the groups in the IMAP server after it has been added.

Return to the *Group* buffer by using q to quit browsing the server, and q again to quit the *Server* buffer.

Now you can access your imap groups just like you access your previously configured groups.

IMAP INBOX

Sent mail

Gnus per default archives email you send in a local group per month, (nnfolder:sent-YYYY-MM). That means the copies are stored in your local disk, only available to Gnus.

If you are using IMAP, you may want to tell Gnus to store copies of your outgoing emails in a group on your IMAP-server instead, so you can access them from any mail client. Something like the following tells Gnus to do that:

; Archive outgoing email in Sent folder on imap.mcom.com:
(setq gnus-message-archive-method '(nnimap "imap.mcom.com")
      gnus-message-archive-group "Sent")

In case you don't want to have emails you have sent show up as unread, a nifty variable to set is this one:

; Mark gcc'ed (archived) as read:
(setq gnus-gcc-mark-as-read t)

Gmail

While seen from Gnus Gmail is "just" another IMAP server, it is quite prevalent, so there is a separate section on Gmail.

Further reading...

Beginning of the Gnus email tutorial.

Topics to cover as time permits:

Contact

If you have any comments, ideas or corrections, don't hesitate to email me.

0.0026 s
webcustodian@koldfront.dk