# GMail投递问题：在发出邮件时，是否严格需要使用子域discourse.ourdomain.org？

**URL:** https://meta.discourse.org/t/gmail-delivery-problems-is-subdomain-discourse-ourdomain-org-strictly-necessary-in-outgoing-mails/365324
**Category:** Support
**Tags:** email
**Created:** [2025年五月8日 14:16 UTC](https://meta.discourse.org/t/gmail-delivery-problems-is-subdomain-discourse-ourdomain-org-strictly-necessary-in-outgoing-mails/365324 "2025-05-08T14:16:46Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![luas](https://avatars.discourse-cdn.com/v4/letter/l/9d8465/32.png) [@luas](https://meta.discourse.org/u/luas)
#### Post date: [2025年五月8日 14:16 UTC](https://meta.discourse.org/t/gmail-delivery-problems-is-subdomain-discourse-ourdomain-org-strictly-necessary-in-outgoing-mails/365324/1 "2025-05-08T14:16:46Z")

</div>

我于 2024 年 12 月开始运行 Discourse 实例，我们是那些遇到 GMail 问题的少数用户之一。  
使用 GMail 地址创建账户的用户永远不会收到我们实例发送的电子邮件。不，垃圾邮件文件夹里也没有。我广泛阅读了 meta.discourse，了解到可能的原因是我们没有为 `discourse.ourdomain.org` 提供有效的 DKIM 签名，只为 `ourdomain.org` 提供了。

我尝试了 [https://meta.discourse.org/t/discourse-another-smtp/262532/10，但没有成功，也没有收到关于如何确切配置它的回复。](https://meta.discourse.org/t/discourse-another-smtp/262532/10%EF%BC%8C%E4%BD%86%E6%B2%A1%E6%9C%89%E6%88%90%E5%8A%9F%EF%BC%8C%E4%B9%9F%E6%B2%A1%E6%9C%89%E6%94%B6%E5%88%B0%E5%85%B3%E4%BA%8E%E5%A6%82%E4%BD%95%E7%A1%AE%E5%88%87%E9%85%8D%E7%BD%AE%E5%AE%83%E7%9A%84%E5%9B%9E%E5%A4%8D%E3%80%82)

再次搜索后，我开始配置 [https://meta.discourse.org/t/configure-google-login-for-discourse/15858，但后来意识到这些用户仍然永远不会收到我们的电子邮件，这只会帮助他们进行身份验证。](https://meta.discourse.org/t/configure-google-login-for-discourse/15858%EF%BC%8C%E4%BD%86%E5%90%8E%E6%9D%A5%E6%84%8F%E8%AF%86%E5%88%B0%E8%BF%99%E4%BA%9B%E7%94%A8%E6%88%B7%E4%BB%8D%E7%84%B6%E6%B0%B8%E8%BF%9C%E4%B8%8D%E4%BC%9A%E6%94%B6%E5%88%B0%E6%88%91%E4%BB%AC%E7%9A%84%E7%94%B5%E5%AD%90%E9%82%AE%E4%BB%B6%EF%BC%8C%E8%BF%99%E5%8F%AA%E4%BC%9A%E5%B8%AE%E5%8A%A9%E4%BB%96%E4%BB%AC%E8%BF%9B%E8%A1%8C%E8%BA%AB%E4%BB%BD%E9%AA%8C%E8%AF%81%E3%80%82)

由于我不认为自己有能力为我们的 discourse 子域配置 DKIM 等，我想知道使用 [discourse@ourdomain.org](mailto:discourse@ourdomain.org) 而不是 [noreply@discourse.ourdomain.org](mailto:noreply@discourse.ourdomain.org) 发送邮件是否会有问题。或者在发出的电子邮件中包含此子域是否有任何强有力的理由？

提前感谢！

---

<div class="post-metadata">

### Author: ![tobiaseigen](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tobiaseigen/32/539204_2.png) [@tobiaseigen](https://meta.discourse.org/u/tobiaseigen)
#### Post date: [2025年五月21日 23:59 UTC](https://meta.discourse.org/t/gmail-delivery-problems-is-subdomain-discourse-ourdomain-org-strictly-necessary-in-outgoing-mails/365324/3 "2025-05-21T23:59:01Z")

</div>

您是如何为您的网站设置出站电子邮件的？在我看来，您需要考虑更换一个更好、更新的提供商。

众所周知，电子邮件很难，我完全理解！🤗

我建议您仔细研究一下电子邮件故障排除步骤。请在此处回复我们，让我们知道您的进展！

> [@Troubleshoot email on a new Discourse install](https://meta.discourse.org/t/troubleshoot-email-on-a-new-discourse-install/16326?u=tobiaseigen):
>
> You just installed Discourse via [the install guide](https://github.com/discourse/discourse/blob/master/docs/INSTALL.md), but email doesn’t seem to work. Unfortunately this means you can’t log in as an admin to finalize the install. cry Let’s troubleshootize! Try the doctor woman_health_workerIf you run ./discourse-doctor it will check several ways that your mail configuration might be broken, and offer advice. Try that first. Did you enter email settings correctly? The simplest way is to run ./discourse-setup again. Did you enter everything correctly? B…

---

<div class="post-metadata">

### Author: ![Thomas\_Rother](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/thomas_rother/32/423597_2.png) [@Thomas\_Rother](https://meta.discourse.org/u/Thomas_Rother)
#### Post date: [2025年五月22日 05:44 UTC](https://meta.discourse.org/t/gmail-delivery-problems-is-subdomain-discourse-ourdomain-org-strictly-necessary-in-outgoing-mails/365324/4 "2025-05-22T05:44:56Z")

</div>

几年前我也遇到过类似的问题。不幸的是，并非所有提供商都了解安全电子邮件交付的要求：

1. 在您的域 DNS 设置中正确设置发件人策略框架 (SPF)
2. 正确地为每封邮件进行 DKIM 签名（例如使用 OpenDKIM）
3. 设置 DMARC 作为 SPF 和 DKIM 失败时的备用方案

这些功能是强制性的，必须在您的本地邮件服务器或提供商的中继邮件服务器上实现。否则，您的出站邮件将被阻止。例如，[gmail.com](http://gmail.com) - 但大多数其他服务也会阻止。

在我的例子中，我使用外部服务 ([duocircle.com](http://duocircle.com)) 作为中继，用于入站邮件（包括垃圾邮件保护）和出站邮件 (smtp)。

---

<div class="post-metadata">

### Author: ![luas](https://avatars.discourse-cdn.com/v4/letter/l/9d8465/32.png) [@luas](https://meta.discourse.org/u/luas)
#### Post date: [2025年五月22日 17:43 UTC](https://meta.discourse.org/t/gmail-delivery-problems-is-subdomain-discourse-ourdomain-org-strictly-necessary-in-outgoing-mails/365324/5 "2025-05-22T17:43:31Z")

</div>

感谢您的回复！由于我没有收到关于子域名是否必要的反馈，我将发件人地址改为discourse@ourdomain.org。这非常有效。

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [2025年六月21日 17:44 UTC](https://meta.discourse.org/t/gmail-delivery-problems-is-subdomain-discourse-ourdomain-org-strictly-necessary-in-outgoing-mails/365324/6 "2025-06-21T17:44:18Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
