Search code examples
emacsopensslimapgnus

Configuring gnus with gmail imap


I am trying to configure gnus to work with my gmail account. My .gnus file looks like this:

(setq gnus-select-method '(nntp "news.gwene.org"))

(setq user-full-name "George P. Burdell")
(setq user-mail-address "[email protected]")

(setq smtpmail-auth-credentials "~/.authinfo.epg")
(add-to-list 'gnus-secondary-select-methods
        '(nnimap "gmail"
           (nnimap-address "imap.gmail.com")
           (nnimap-server-port 993)
           (nnimap-stream ssl)
           (nnimap-authinfo-file "~/.authinfo.epg")
           )
        )
(setq smtpmail-stream-type 'ssl
       smtpmail-smtp-server "smtp.gmail.com"
       smtpmail-smtp-service 465)

and my .authinfo.epg file looks like this:

machine imap.gmail.com login [email protected] password secret port 993
machine smtp.gmail.com login [email protected] password secret port 465

and the error that it throws is:

Generating the cache active file...done
Opening nnfolder server on archive...done
Opening nnimap server on gmail...
Opening connection to imap.gmail.com via tls...
Opening TLS connection to `imap.gmail.com'...
Opening TLS connection with `gnutls-cli --insecure -p 993 imap.gmail.com'...failed
Opening TLS connection with `gnutls-cli --insecure -p 993 imap.gmail.com --protocols ssl3'...failed
Opening TLS connection with `openssl s_client -connect imap.gmail.com:993 -no_ssl2 -ign_eof'...failed
Opening TLS connection to `imap.gmail.com'...failed
Unable to open server nnimap+gmail due to: Buffer  *nnimap imap.gmail.com 993  *nntpd** has no process
Opening nnimap server on gmail...failed: 
No new newsgroups
Checking new news...
Reading active file from gmail via nnimap...
Opening nnimap server on gmail...
Server nnimap+gmail previously determined to be down; not retrying
Opening nnimap server on gmail...failed: 
Reading active file via nndraft...done
Checking new news...done
Warning: Opening nnimap server on gmail...failed: ; Server nnimap+gmail previously determined to be down; not retrying; Opening nnimap server on gmail...failed: ; Unable to open server nnimap+gmail due to: Buffer  *nnimap imap.gmail.com 993  *nntpd** has no process

(sorry for wall of text)

finally, when I evaluate this:

(gnutls-available-p)

it simply prints:

nil

I'm running emacs for windows 8, I'm not using cygwin, and I really can't figure out what the problem is, even after seraching for hours.

edit: I've tried both of these (as well as combinations from both) and get the same errors:

http://blog.binchen.org/posts/notes-on-using-gnus.html

http://www.emacswiki.org/emacs/GnusGmail


Solution

  • My guess would be that Emacs on Windows doesn't come with the required libraries, hence (gnutls-available-p) returns nil for you. You'll have to install gnutls somewhere so that your Emacs will be able to find it, cf. the GnuTLS homepage. You probably have to put the downloaded Windows library into the directory where Emacs is looking for it's libraries.