GNU Emacs Gnus 无法连接到 gmail IMAP

GNU Emacs Gnus 无法连接到 gmail IMAP

我正在配置 Gnus 以通过 IMAP 从我的 Gmail 帐户检索电子邮件。我已经按照建议完成了https://www.emacswiki.org/emacs/GnusGmail,但是我在启动时不断收到来自 Gnus 的错误:

Opening connection to imap.gmail.com via tls...
nnimap (gmail) open error: 'NO (ALERT) Please log in via your web browser:
https://support.google.com/mail/accounts/answer/78754 (Failure)'.  Continue? (y
or n)  y
Saving file /home/mark/.newsrc-dribble...
Wrote /home/mark/.newsrc-dribble [2 times]
Gnus auto-save file exists.  Do you want to read it? (y or n)  y
Opening nnimap server on gmail...
Server nnimap+gmail previously determined to be down; not retrying
Opening nnimap server on gmail...failed: NO (ALERT) Please log in via your web
browser: https://support.google.com/mail/accounts/answer/78754 (Failure)
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: NO (ALERT) Please log in via your web
browser: https://support.google.com/mail/accounts/answer/78754 (Failure)
Reading active file via nndraft...done
Checking new news...done
No news is good news
Warning: Opening nnimap server on gmail...failed: NO (ALERT) Please log in via
your web browser: https://support.google.com/mail/accounts/answer/78754
(Failure); Server nnimap+gmail previously determined to be down; not retry\
ing; Opening nnimap server on gmail...failed: NO (ALERT) Please log in via your
web browser: https://support.google.com/mail/accounts/answer/78754 (Failure);
Server nnimap+gmail previously determined to be down; not retrying
gnus-group-read-group: No group on current line

我安装了 GnuTLS,并且 gnutls-cli 似乎可以与 imap.gmail.com:993 配合使用,我收到“OK Gimap 已准备好请求”。

这是我的 ~/.gnus:

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

(setq smtpmail-smtp-service 587
      gnus-ignored-newsgroups "^to\\.\\|^[0-9. ]+\\( \\|$\\)\\|^[\"]\"[#'()]")

我的 ~/.authinfo 看起来像这样:

machine imap.gmail.com login [email protected] password my_password port 993
machine smtp.gmail.com login [email protected] password my_password port 587

可能是什么问题呢?

答案1

默认情况下,Gmail 不允许不符合其模糊定义的安全标准的客户端访问 IMAP - 我在测试用 Python 的 imaplib 编写的一些脚本时遇到了同样的情况。您需要访问该网站并启用安全性较低的应用程序的连接。

来自 Google 的信息页面(包括指向设置屏幕的直接链接):https://support.google.com/accounts/answer/6010255

相关内容