Next: FAQ 3-10, Previous: FAQ 3-8, Up: FAQ 3 - Getting Messages [Contents][Index]

#### FAQ 3-9

#### Question 3.9

And what about IMAP?

#### Answer

There are two ways of using IMAP with Gnus. The first one is to use IMAP like POP3, that means Gnus fetches the mail from the IMAP server and stores it on disk. If you want to do this (you don’t really want to do this) add the following to `~/.gnus.el`

    (add-to-list 'mail-sources '(imap :server "mail.mycorp.com"
                                      :user "username"
                                      :pass "password"
                                      :stream network
                                      :authentication login
                                      :mailbox "INBOX"
                                      :fetchflag "\\Seen"))

You might have to tweak the values for stream and/or authentication, see the Gnus manual node "Mail Source Specifiers" for possible values.

If you want to use IMAP the way it’s intended, you’ve got to follow a different approach. You’ve got to add the nnimap back end to your select method and give the information about the server there.

    (add-to-list 'gnus-secondary-select-methods
                 '(nnimap "Give the baby a name"
                          (nnimap-address "imap.yourProvider.net")
                          (nnimap-port 143)
                          (nnimap-list-pattern "archive.*")))

Again, you might have to specify how to authenticate to the server if Gnus can’t guess the correct way, see the Manual Node "IMAP" for detailed information.