2

Emacs gnus を使用して gmail アカウントに接続しようとしています。これは関連する構成コードで、主にここから取得されます。

(setq tls-program '("openssl s_client -CAfile C:/Users/GGustafson/gmail.crt -connect %h:%p -no_ssl2 -ign_eof"))

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

(setq message-send-mail-function 'smtpmail-send-it
 smtpmail-starttls-credentials '(("smtp.gmail.com" 587 nil nil))
  smtpmail-auth-credentials '(("smtp.gmail.com" 587 "gordon3.14@gmail.com" nil))
  smtpmail-default-smtp-server "smtp.gmail.com"
  smtpmail-smtp-server "smtp.gmail.com"
  smtpmail-smtp-service 587)

再起動し、emacs を起動して実行するとM-x gnus、次のようになります*Messages*

Opening connection to imap.gmail.com via tls...
gnutls.c: [1] (Emacs) GnuTLS library not found
Opening TLS connection to `imap.gmail.com'...
Opening TLS connection with `openssl s_client -CAfile C:/Users/GGustafson/gmail.crt -connect imap.gmail.com:993 -no_ssl2 -ign_eof'...done
Opening TLS connection to `imap.gmail.com'...done
nnimap (gmail) open error: 'depth=3 C = US, O = Equifax, OU = Equifax Secure Certificate Authority^M
'.  Continue? (y or n)  y

ここで正確に何が起こっているのですか?以前はいくつかのエラーが発生していましたが、適切な証明書のコピーを使用してパラメーターを追加する手順に従ってverify error:num=20:unable to get local issuer certificateエラーを修正しました。-CAfile

それを確認するために、私はこれを行うことができます:

C:\Users\GGustafson>openssl s_client -CAfile C:/Users/GGustafson/gmail.crt -connect imap.gmail.com:993 -no_ssl2 -ign_eof
CONNECTED(00000003)
depth=3 C = US, O = Equifax, OU = Equifax Secure Certificate Authority verify return:1
depth=2 C = US, O = GeoTrust Inc., CN = GeoTrust Global CA verify return:1
depth=1 C = US, O = Google Inc, CN = Google Internet Authority G2 verify return:1
depth=0 C = US, ST = California, L = Mountain View, O = Google Inc, CN = imap.gmail.com verify return:1
---
Certificate chain
 0 s:/C=US/ST=California/L=Mountain View/O=Google Inc/CN=imap.gmail.com
   i:/C=US/O=Google Inc/CN=Google Internet Authority G2
 1 s:/C=US/O=Google Inc/CN=Google Internet Authority G2
   i:/C=US/O=GeoTrust Inc./CN=GeoTrust Global CA
 2 s:/C=US/O=GeoTrust Inc./CN=GeoTrust Global CA
   i:/C=US/O=Equifax/OU=Equifax Secure Certificate Authority
---
Server certificate
-----BEGIN CERTIFICATE-----
****SNIP****
    Start Time: 1387083719
    Timeout   : 300 (sec)
    Verify return code: 0 (ok)
---
* OK Gimap ready for requests from 128.84.124.191 el7if9939594qeb.109

gnus で Gmail を読めるようになるには何が足りないのですか? Cygwin opensslを使用してWindows 7を使用しています。

4

2 に答える 2

1

私にとってうまくいったのは、opensslの代わりにwindows用のgnutlsポートを使用し、のカスタマイズを削除することですtls-program. gnutls-cliのデフォルト値で試す最初のプログラムであるため、Emacs は gnutls のバイナリがパス上にあれば自動的に使用しますtls-program

openssl を試す前に gnutls を使用することをお勧めします。何らかの理由でデフォルトで最初に表示される可能性があります。

于 2013-12-18T00:02:52.917 に答える