# 可能的邮件 bug：证书验证失败 (无法获取本地颁发者证书)

**URL:** <https://meta.discourse.org/t/possible-bug-with-mail-certificate-verify-failed-unable-to-get-local-issuer-certificate/289707>\
**Category:** Self-hosting\
**Created:** [2023 年12 月 25 日 06:16 UTC](https://meta.discourse.org/t/possible-bug-with-mail-certificate-verify-failed-unable-to-get-local-issuer-certificate/289707 "2023-12-25T06:16:43Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

作者： ![AstonJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/astonj/32/215041_2.png) [@AstonJ](https://meta.discourse.org/u/AstonJ)\
发布日期： [2023 年12 月 25 日 06:16 UTC](https://meta.discourse.org/t/possible-bug-with-mail-certificate-verify-failed-unable-to-get-local-issuer-certificate/289707/1 "2023-12-25T06:16:43Z")

</div>

在新的服务器上设置 Discourse 安装时，邮件出现了问题（`certificate verify failed (unable to get local issuer certificate)`），尽管我可以通过 Mac 和 iPhone 从同一个地址发送/接收电子邮件（没有任何证书错误）。

再次按照此指南进行了测试：[mail:test-smtp-auth-telnet-测试通过-235 []](https://www.ndchost.com/wiki/mail/test-smtp-auth-telnet%EF%BC%8C%E6%B5%8B%E8%AF%95%E9%80%9A%E8%BF%87%EF%BC%9A%60235) 2.7.0 Authentication successful`。

最后，我按照 @Falco 在另一个帖子中的建议，在 app.yml 中添加了以下内容：

```plaintext
  DISCOURSE_SMTP_ENABLE_START_TLS: false
  DISCOURSE_SMTP_OPENSSL_VERIFY_MODE: none

```

但这仍然感觉像是一个 bug，因为使用相同的电子邮件和凭据在其他地方都可以正常工作，所以我想在这里发帖，以防万一。

---

_[View the full topic](https://meta.discourse.org/t/possible-bug-with-mail-certificate-verify-failed-unable-to-get-local-issuer-certificate/289707)._
