# 我有一个关于配置邮件系统的问题

**URL:** <https://meta.discourse.org/t/i-have-a-question-about-configuring-the-mail-system/183739>\
**Category:** Self-hosting\
**Created:** [2021年三月19日 09:36 UTC](https://meta.discourse.org/t/i-have-a-question-about-configuring-the-mail-system/183739 "2021-03-19T09:36:27Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ym\_gg](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ym_gg/32/213761_2.png) [@Ym\_gg](https://meta.discourse.org/u/Ym_gg)\
**Post date:** [2021年三月19日 09:36 UTC](https://meta.discourse.org/t/i-have-a-question-about-configuring-the-mail-system/183739/1 "2021-03-19T09:36:27Z")

</div>

_你好！我来自中国，以下内容来自翻译软件_

_这是我第一次使用国际论坛。如果有低级错误，请帮我纠正_  
_ **谢谢！** _

我正在使用 /var/discourse/discover-setup 来配置 “discourse”，  
但在邮件方面遇到了一个大问题。  
我尝试迁移其他论坛软件的邮箱配置，  
当我尝试发送邮件时，  
发现邮件被发送到了一个奇怪的地址。  
而且我非常沮丧，因为我未能正确收到邮件。

 ![image](https://global.discourse-cdn.com/meta/original/3X/5/b/5b9a03d49ea0dedfa1df8b52a6ef001dc0d6309b.jpeg)

以下是我的 Foxmail 软件配置，它可以正常工作：

（我无法上传图片或 https 地址 ☹）

 ![](https://global.discourse-cdn.com/meta/original/3X/f/3/f393431e1eb0db9c5da1b1718fa4b42c81913a9f.png)

我已经尝试了多种配置方法，请帮我指出我的配置中哪里出了问题！

我会尽力在帖子中补充缺失的信息。

如果您能帮我解决这个问题，我将非常感激！

FoxMail: [Foxmail for Windows](https://www.foxmail.com/win/en/)

---

<div class="post-metadata">

**Author:** ![Ym\_gg](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ym_gg/32/213761_2.png) [@Ym\_gg](https://meta.discourse.org/u/Ym_gg)\
**Post date:** [2021年三月19日 09:40 UTC](https://meta.discourse.org/t/i-have-a-question-about-configuring-the-mail-system/183739/2 "2021-03-19T09:40:30Z")

</div>

补充：我使用阿里云企业邮箱  
[AliMail 企业版 (aliyun.com)](https://qiye.aliyun.com/?lang=en)  
如需测试，我可以为您提供账号。

---

<div class="post-metadata">

**Author:** ![schleifer](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/schleifer/32/86416_2.png) [@schleifer](https://meta.discourse.org/u/schleifer)\
**Post date:** [2021年三月19日 11:22 UTC](https://meta.discourse.org/t/i-have-a-question-about-configuring-the-mail-system/183739/3 "2021-03-19T11:22:21Z")

</div>

UUID@hibot.top 并非所使用的电子邮件地址，而是已发送邮件的 [消息 ID](https://en.wikipedia.org/wiki/Message-ID)。

当您尝试发送消息时，日志中是否显示任何错误？-- [https://forum.hibot.top/logs/](https://forum.hibot.top/logs/)

---

<div class="post-metadata">

**Author:** ![Ym\_gg](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ym_gg/32/213761_2.png) [@Ym\_gg](https://meta.discourse.org/u/Ym_gg)\
**Post date:** [2021年三月19日 12:55 UTC](https://meta.discourse.org/t/i-have-a-question-about-configuring-the-mail-system/183739/4 "2021-03-19T12:55:37Z")

</div>

（抱歉我迟到了

我清除了日志并重新发送，但日志里什么都没有（抱歉我的英语不太标准

 ![image](https://global.discourse-cdn.com/meta/original/3X/3/6/364e8db53c817687525ad714b6f297c807b81765.png)

---

<div class="post-metadata">

**Author:** ![Ym\_gg](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ym_gg/32/213761_2.png) [@Ym\_gg](https://meta.discourse.org/u/Ym_gg)\
**Post date:** [2021年三月19日 13:03 UTC](https://meta.discourse.org/t/i-have-a-question-about-configuring-the-mail-system/183739/5 "2021-03-19T13:03:00Z")

</div>

那是 SideKiq 的登录界面

 ![image](https://global.discourse-cdn.com/meta/original/3X/4/c/4c32c58f9dd30a9abf85980f6dedcbb1cdb19bdc.png)

---

<div class="post-metadata">

**Author:** ![Ym\_gg](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ym_gg/32/213761_2.png) [@Ym\_gg](https://meta.discourse.org/u/Ym_gg)\
**Post date:** [2021年三月19日 13:10 UTC](https://meta.discourse.org/t/i-have-a-question-about-configuring-the-mail-system/183739/7 "2021-03-19T13:10:43Z")

</div>

![image](https://global.discourse-cdn.com/meta/original/3X/3/0/303cbe7c4daa6e18588454fd5d98dd88bc928729.png)

---

<div class="post-metadata">

**Author:** ![Ym\_gg](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ym_gg/32/213761_2.png) [@Ym\_gg](https://meta.discourse.org/u/Ym_gg)\
**Post date:** [2021年三月20日 16:12 UTC](https://meta.discourse.org/t/i-have-a-question-about-configuring-the-mail-system/183739/8 "2021-03-20T16:12:08Z")

</div>

我仍然遇到麻烦，请帮我，谢谢！  
我重新安装了它并尝试发送验证邮件，日志如下：

 ![image](https://global.discourse-cdn.com/meta/original/3X/4/4/44f1046f85e993a3d53077f5a79680f0d60df8ec.jpeg)

---

<div class="post-metadata">

**Author:** ![Benjamin\_D](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/benjamin_d/32/277831_2.png) [@Benjamin\_D](https://meta.discourse.org/u/Benjamin_D)\
**Post date:** [2021年三月20日 17:17 UTC](https://meta.discourse.org/t/i-have-a-question-about-configuring-the-mail-system/183739/9 "2021-03-20T17:17:45Z")

</div>

您的防火墙是否可能阻止了 465 端口？  
`telnet smtp.hibot.top 465`

---

<div class="post-metadata">

**Author:** ![Ym\_gg](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ym_gg/32/213761_2.png) [@Ym\_gg](https://meta.discourse.org/u/Ym_gg)\
**Post date:** [2021年三月21日 00:02 UTC](https://meta.discourse.org/t/i-have-a-question-about-configuring-the-mail-system/183739/10 "2021-03-21T00:02:25Z")

</div>

我连接了 10 秒后就断开了。  
@Benjamin_D

 ![image](https://global.discourse-cdn.com/meta/original/3X/f/1/f1e44c278043eed183c46e9b5262f72427f27b5d.png)  
谢谢你的回复（当你回复时，我这里已经是下午 1 点，我正在睡觉）。

---

<div class="post-metadata">

**Author:** ![hawm](https://avatars.discourse-cdn.com/v4/letter/h/f07891/32.png) [@hawm](https://meta.discourse.org/u/hawm)\
**Post date:** [2021年三月21日 04:25 UTC](https://meta.discourse.org/t/i-have-a-question-about-configuring-the-mail-system/183739/11 "2021-03-21T04:25:25Z")

</div>

您可以直接在 Discourse 文件夹中运行 `discourse-doctor`，测试结果的“邮件测试”部分可能会很有帮助。

我建议使用 DirectMail（邮件推送），这也是阿里巴巴的产品，提供一定的免费额度，功能类似于 Mailgun。

---

<div class="post-metadata">

**Author:** ![Ym\_gg](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ym_gg/32/213761_2.png) [@Ym\_gg](https://meta.discourse.org/u/Ym_gg)\
**Post date:** [2021年三月21日 05:03 UTC](https://meta.discourse.org/t/i-have-a-question-about-configuring-the-mail-system/183739/12 "2021-03-21T05:03:43Z")

</div>

我试过了，但错误依旧：到达文件末尾  
@Hawm

 ![image](https://global.discourse-cdn.com/meta/original/3X/5/a/5a795bd40e3ef99d91bac0425ca16172af68cb0a.jpeg)  
我使用的是企业版阿里邮箱，因为它是免费的 😊，不过我会尝试直接使用邮件服务，谢谢。

---

<div class="post-metadata">

**Author:** ![hawm](https://avatars.discourse-cdn.com/v4/letter/h/f07891/32.png) [@hawm](https://meta.discourse.org/u/hawm)\
**Post date:** [2021年三月21日 05:13 UTC](https://meta.discourse.org/t/i-have-a-question-about-configuring-the-mail-system/183739/13 "2021-03-21T05:13:53Z")

</div>

这可能是端口 465 的问题。

> [@Discourse with other websites, SMTP issue: End of file reached](https://meta.discourse.org/t/discourse-with-other-websites-smtp-issue-end-of-file-reached/162893/5?u=hawm):
>
> Before I saw this I was going to recommend this change. Port 465 is SMTP-over-SSL, which is deprecated Port 587 is the MSA port (mail submission agent) on which STARTTLS (upgrade from a plaintext to a TLS connection) is typically supported When you had 465 in the configuration, Discourse was trying to talk plaintext to an SSL port.

---

<div class="post-metadata">

**Author:** ![Ym\_gg](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ym_gg/32/213761_2.png) [@Ym\_gg](https://meta.discourse.org/u/Ym_gg)\
**Post date:** [2021年三月21日 05:17 UTC](https://meta.discourse.org/t/i-have-a-question-about-configuring-the-mail-system/183739/14 "2021-03-21T05:17:28Z")

</div>

好的，我正在查看这个帖子。DirectMail 对我来说太贵了，我无法在 6 个月内发送 5 万封邮件，费用高达 11 美元。而我的服务器每月仅需 3.5 美元：joy:

 ![image](https://global.discourse-cdn.com/meta/original/3X/4/a/4ab1d2a70fd54d9cf495f9d373e0a19f0d28c1b5.png)

---

<div class="post-metadata">

**Author:** ![hawm](https://avatars.discourse-cdn.com/v4/letter/h/f07891/32.png) [@hawm](https://meta.discourse.org/u/hawm)\
**Post date:** [2021年三月21日 05:21 UTC](https://meta.discourse.org/t/i-have-a-question-about-configuring-the-mail-system/183739/15 "2021-03-21T05:21:09Z")

</div>

您忽略了最后一部分。

 ![Screenshot from 2021-03-21 13-19-30](https://global.discourse-cdn.com/meta/original/3X/6/8/68af8b0cf74c4cfb3c125fec50baaab46043a1fb.png)

如果您想继续使用 Business Email，可以尝试查看它是否支持其他端口。

---

<div class="post-metadata">

**Author:** ![Ym\_gg](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ym_gg/32/213761_2.png) [@Ym\_gg](https://meta.discourse.org/u/Ym_gg)\
**Post date:** [2021年三月21日 05:26 UTC](https://meta.discourse.org/t/i-have-a-question-about-configuring-the-mail-system/183739/16 "2021-03-21T05:26:44Z")

</div>

哦，我没看到（但 DirectMail 也在 465 端口运行）。  
感谢您的回复，这对我很有帮助。  
我认为端口 465 的问题应该添加到此帖子中：[在新 Discourse 安装中排查电子邮件问题 - 操作指南 / 系统管理员 - Discourse Meta](https://meta.discourse.org/t/troubleshooting-email-on-a-new-discourse-install/16326)

---

<div class="post-metadata">

**Author:** ![hawm](https://avatars.discourse-cdn.com/v4/letter/h/f07891/32.png) [@hawm](https://meta.discourse.org/u/hawm)\
**Post date:** [2021年三月21日 05:29 UTC](https://meta.discourse.org/t/i-have-a-question-about-configuring-the-mail-system/183739/17 "2021-03-21T05:29:39Z")

</div>

如果您确实不需要 SSL/TLS，可以使用端口 80，这在我这里是可以工作的。

---

<div class="post-metadata">

**Author:** ![Ym\_gg](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ym_gg/32/213761_2.png) [@Ym\_gg](https://meta.discourse.org/u/Ym_gg)\
**Post date:** [2021年三月21日 05:32 UTC](https://meta.discourse.org/t/i-have-a-question-about-configuring-the-mail-system/183739/18 "2021-03-21T05:32:41Z")

</div>

好的，我会试试，谢谢。

---

<div class="post-metadata">

**Author:** ![riking](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/riking/32/170938_2.png) [@riking](https://meta.discourse.org/u/riking)\
**Post date:** [2021年三月21日 23:50 UTC](https://meta.discourse.org/t/i-have-a-question-about-configuring-the-mail-system/183739/19 "2021-03-21T23:50:47Z")

</div>

刚补充了一些说明，指出 465 通常是不正确的：slight\_smile:

---

<div class="post-metadata">

**Author:** ![Ym\_gg](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ym_gg/32/213761_2.png) [@Ym\_gg](https://meta.discourse.org/u/Ym_gg)\
**Post date:** [2021年三月22日 02:23 UTC](https://meta.discourse.org/t/i-have-a-question-about-configuring-the-mail-system/183739/20 "2021-03-22T02:23:52Z")

</div>

哇，谢谢你的帮助😀

---

<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:** [2021年四月21日 02:24 UTC](https://meta.discourse.org/t/i-have-a-question-about-configuring-the-mail-system/183739/21 "2021-04-21T02:24:02Z")

</div>

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