gpt4 book ai didi

ssl-certificate - 使用 isync 或 offlineimap 离线同步和阅读 Gmail

转载 作者:行者123 更新时间:2023-12-05 04:14:46 27 4
gpt4 key购买 nike

我的目标是从 Gmail 帐户同步我的电子邮件并将它们编入索引以便在 Emacs 中搜索和阅读。后者尚不相关,因为我无法将电子邮件同步到我的笔记本电脑。

我正在运行 Mavericks,因此在 Mac 终端中工作。

我关注了SO accepted answer and the answer in the same thread尝试使用 offlineimap,以及 this (more promising) tutorial on using isync 中的第二种方法(所以 mbsync)。这两种方式最终都使用 mu 和 Emacs 的界面:mu4e

证书未被正确读取/解释。我不知道为什么,因为我不明白错误信息。这是来自 offlineimap 的:

> OfflineIMAP 6.5.7
Licensed under the GNU GPL v2 or any later version (with an OpenSSL exception)
Account sync Gmail:
*** Processing account Gmail
Establishing connection to imap.gmail.com:993
PLAIN authentication failed: [ALERT] Please log in via your web browser: https://support.google.com/mail/accounts/answer/78754 (Failure)
LOGIN authentication failed: [ALERT] Please log in via your web browser: https://support.google.com/mail/accounts/answer/78754 (Failure)
ERROR: All authentication types failed:
PLAIN: [ALERT] Please log in via your web browser: https://support.google.com/mail/accounts/answer/78754 (Failure)
LOGIN: [ALERT] Please log in via your web browser: https://support.google.com/mail/accounts/answer/78754 (Failure)
*** Finished account 'Gmail' in 0:01
ERROR: Exceptions occurred during the run!
ERROR: All authentication types failed:
PLAIN: [ALERT] Please log in via your web browser: https://support.google.com/mail/accounts/answer/78754 (Failure)
LOGIN: [ALERT] Please log in via your web browser: https://support.google.com/mail/accounts/answer/78754 (Failure)
>
> Traceback: File
> "/usr/local/Cellar/offline-imap/6.5.7/libexec/offlineimap/accounts.py",
> line 263, in syncrunner
> self.__sync() File "/usr/local/Cellar/offline-imap/6.5.7/libexec/offlineimap/accounts.py",
> line 326, in __sync
> remoterepos.getfolders() File "/usr/local/Cellar/offline-imap/6.5.7/libexec/offlineimap/repository/IMAP.py",
> line 351, in getfolders
> imapobj = self.imapserver.acquireconnection() File "/usr/local/Cellar/offline-imap/6.5.7/libexec/offlineimap/imapserver.py",
> line 451, in acquireconnection
> self.__authn_helper(imapobj) File "/usr/local/Cellar/offline-imap/6.5.7/libexec/offlineimap/imapserver.py",
> line 366, in __authn_helper
> "failed:\n\t%s"% msg, OfflineImapError.ERROR.REPO)

这是来自 mbsync 的:

> C: 0/3  B: 0/2  M: +0/0 *0/0 #0/0  S: +0/0 *0/0 #0/0
Error while loading certificate file '/usr/local/etc/openssl/certs/Equifax.crt': error:00000000:lib(0):func(0):reason(0)
C: 3/3 B: 0/2 M: +0/0 *0/0 #0/0 S: +0/0 *0/0 #0/0

我已经用 Homebrew 安装了所有东西,并按照教程使用文件夹。问题出在证书上,但我不知道问题出在哪里。我在 Gmail 中进行了设置以允许 IMAP 并允许连接安全性较低的应用程序。

我如何以不同方式处理证书?

最佳答案

对于 offlineimap 错误,Google 提示您没有使用 Oauth2。按照此处的解释,我解决了同样的 offlineimap 问题:https://github.com/OfflineIMAP/offlineimap/issues/228

您需要配置您的 .offlineimaprc 以使用 Oauth2 而不是指定用户名/密码。以下是有关如何生成 token 的模板和说明: https://github.com/OfflineIMAP/offlineimap/blob/master/offlineimap.conf#L764

这里是重要的设置:

auth_mechanisms = GSSAPI, CRAM-MD5, XOAUTH2, PLAIN, LOGIN
oauth2_client_secret = ...
oauth2_client_id = ...
oauth2_refresh_token = ...

关于ssl-certificate - 使用 isync 或 offlineimap 离线同步和阅读 Gmail,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34246542/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com