邮件系统无法工作,尽管我用telnet和其他平台测试过

For some reason, I am not getting a mail from my discourse setup.

I already tested my SMTP settings and they are working for other platforms

Also tested it with Telnet.

1 个赞

See Troubleshooting email on a new Discourse install.

A common problem is that Discourse is sending from an address that your server will not accept.

4 个赞

I am in a similar situation. Installed, website responds, registration e-mail never gets there. Tested sending e-mail from the discourse server, from inside the app container using the same configuration/credentials => works, test message sent and received correctly. Running doctor gives me:

Sending mail to my_correct_user@my_correct_domain. . . 
Testing sending to my_correct_user@my_correct_domain using correct_smtp_server_name:465, username:correct_smpt_user@correct_sender_domain with plain auth.
======================================== ERROR ========================================
                                    UNEXPECTED ERROR

Net::ReadTimeout

====================================== SOLUTION =======================================
This is not a common error. No recommended solution exists!
[....]

I tried switching port to 587, then the Net::ReadTimeout doesn’t show in the logs but still nothing gets sent. What next? What is the correct content of DISCOURSE_SMTP_DOMAIN ? That’s the only thing I am still suspicious about.

same issue here. Please help

If you’re getting a read timeout it’s because the outgoing smtp port is blocked. You’ll need to get it unblocked or use another port.

1 个赞

我个人在该服务器上使用 submission 端口,因此该端口肯定不会被阻止。而且——对了——在使用 587 端口时,不会出现超时错误。由于我无法更改服务器的配置,我是否应该理解它仅支持 SMTPS

端口 587 支持显式 TLS(STARTTLS),邮件服务器可以配置为在该端口接受提交而不要求 TLS,因此您可以通过该端口进行未加密的 SMTP 传输。

(现在已基本弃用的端口 465 支持隐式 TLS,您别无选择。)

好的,服务器已配置为在提交端口(587)上使用显式 TLS。现在,需要在 Discourse 配置中进行哪些设置才能使其在 587 端口上 使用 TLS 工作?它应该/不应该开箱即用吗?

有一个 DISCOURSE_SMTP_ENABLE_START_TLS,其默认值为 true