Trouble opening gmail nnimap server in Emacs gnus on Windows

萝らか妹 提交于 2019-12-02 00:17:01

One thing I needed to do on Windows 7 to connect to gmail from gnus was:

;; So gnutls can find trustfiles on windows
(eval-after-load "gnutls"
'(progn
  (setq gnutls-trustfiles '("c:/cygwin/usr/ssl/certs/ca-bundle.trust.crt" "c:/cygwin/usr/ssl/certs/ca-bundle.crt"))))

Other than that, rest of setup is similar:

(setq gnus-secondary-select-methods
      '(
    (nnimap "gmail"
           (nnimap-address "imap.gmail.com")
           (nnimap-server-port 993)
           (nnimap-stream ssl)
           (nnir-search-engine imap)
           (nnimap-authinfo-file "~/.authinfo")
           )
    (nntp "news.gmane.org")
    (nnfolder "archive"
      (nnfolder-directory   "~/Documents/Text/Gnus/Mail/archive")
      (nnfolder-active-file "~/Documents/Text/Gnus/Mail/archive/active")
      (nnfolder-get-new-mail nil)
      (nnfolder-inhibit-expiry t))))

Able to read mail fine from gmail.

What worked for me is using a gnutls port for windows instead of openssl, and removing any customization of tls-program. Emacs will use the binaries from gnutls automatically if they are on your path since gnutls-cli is the first program to try in the default values of tls-program.

I suggest using gnutls before trying openssl, it probably comes first in the defaults for a reason.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!