为什么我无法从 Cyrus-imap pop3 服务器检索电子邮件?

为什么我无法从 Cyrus-imap pop3 服务器检索电子邮件?

当我在 Thunderbird 客户端中单击“获取邮件”时,我无法从 Cyrus-imap pop3 服务器检索任何电子邮件。我将 Thunderbird 客户端配置为使用 pop3 端口 995,连接安全性:SSL/TLS。Thunderbird 中没有显示任何错误消息。看起来 Thurderbird 已登录服务器,但发现邮箱是空的。但是,邮箱实际上不是空的,因为我可以使用 openssl 从中检索电子邮件。在 Thunderbird 连接期间,/var/log/maillog 中有一些日志:

Sep 14 04:17:32 host1 pop3s[26537]: skiplist: checkpointed /var/lib/imap/tls_sessions.db (125 records, 23196 bytes) in 0 seconds
Sep 14 04:17:32 host1 pop3s[26537]: starttls: TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits new) no authentication
Sep 14 04:17:32 host1 pop3s[26537]: counts: retr=<0> top=<0> dele=<0>

为什么日志中会出现 starttls?我将 Thunderbird 配置为使用 SSL/TLS 而不是 STARTTLS。“counts: retr=<0> top=<0> dele=<0>”是什么意思?

我认为问题可能是由 Cyrus-imap 使用的自签名证书引起的。因此我为该域申请了 letsencrypt 证书,并将 /etc/imap.conf 从

tls_cert_file: /etc/pki/cyrus-imapd/cyrus-imapd.pem
tls_key_file: /etc/pki/cyrus-imapd/cyrus-imapd.pem
tls_ca_file: /etc/pki/tls/certs/ca-bundle.crt

到:

tls_cert_file:        /etc/letsencrypt/live/example.com/fullchain.pem
tls_key_file:        /etc/letsencrypt/live/example.com/privkey.pem
tls_ca_file:        /etc/letsencrypt/live/example.com/chain.pem

,并将/etc/letsencrypt/live/example.com/、/etc/letsencrypt/archive/example.com/以及目录中所有文件的权限设置为777。当我再次点击Thunderbird中的“获取消息”时,问题仍然存在,但是/var/log/maillog中的日志更改为:

Sep 14 04:36:25 host1 pop3s[30099]: skiplist: checkpointed /var/lib/imap/tls_sessions.db (126 records, 23388 bytes) in 0 seconds
Sep 14 04:36:25 host1 pop3s[30099]: TLS server engine: cannot load CA data
Sep 14 04:36:25 host1 pop3s[30099]: unable to get certificate from '/etc/letsencrypt/live/example.com/fullchain.pem'
Sep 14 04:36:25 host1 pop3s[30099]: TLS server engine: cannot load cert/key data
Sep 14 04:36:25 host1 pop3s[30099]: [pop3d] error initializing TLS
Sep 14 04:36:25 host1 pop3s[30099]: Fatal error: tls_init() failed
Sep 14 04:36:25 host1 pop3s[30099]: counts: retr=<0> top=<0> dele=<0>

那么问题到底是什么?Thunderbird 是否成功连接/登录服务器但由于某种原因未找到消息,或者只是无法连接到服务器?

相关内容