点击 admin/email/bounced 中的 "Email Type" 字段时出现 "Discourse::NotFound" 错误

I think clicking on an “Email Type” field, e.g. user_watching_first_post is meant to display details of the bounce message received from the intended recipient.

But on my self-hosted site I get the error message stated above. Is there anything I can do to fix this?

Thanks.

2 个赞

That is correct. I’ve just checked this on my hosted Discourse site and it’s working without any problems. If your site is on the latest version of Discourse, I’m wondering is the issue is related to how your mail server handles forwarding the bounce message.

2 个赞

Thanks. For outgoing mail I’m using Mailgun. I think I used Discourse’s recommended settings.

For incoming mail I’m using this Straightforward direct-delivery incoming mail But I’ve never updated it since installation - might that be the problem? As it’s ./launcher rebuild app for Discourse, is it ./launcher rebuild mail-receiver?

1 个赞

Yes, that’s how to upgrade it. It’s been a while since the last update, I think, but a good first stop) step would be to upgrade it and discourse.

2 个赞

I have upgraded both and still get the same error, including (I think) for emails received since the upgrade. Any further ideas?

3 个赞

Same problem here. Self-hosted, up to date. Bounces being handled the recommended way. Links from before we changed to proper bounce handling work fine.

4 个赞

Yes likely Discourse isn’t getting it from Mailgun. I don’t know how the webhooks work but suspect it just tells Discourse there has been a temporary/permanent failure without sending the bounce message.

2 个赞

Is there any way to make this Discourse feature work with Mailgun?

It should be possible to show at least the error code and message:

Both SMTP error code and SMTP error message are preserved
“code”: 550,
“address”: “'baz@example.com”,
“error”: “Message was not accepted – invalid mailbox. Local mailbox 'baz@example.com is unavailable: user not found”

If not then at least we need a sensible error message to explain why the link doesn’t work :slight_smile:

2 个赞

这方面有进展吗?如果有的话,我将非常感激 :slight_smile:

我使用的是 Digital Ocean 和 Mailgun(即主要的推荐服务),所以可以想象遇到这个问题的不仅仅是我。

3 个赞

经过我自己的测试,似乎在很多情况下,邮件接收者根本没有收到退信。(我只发现了一个连接尝试,但很快就丢失了)。我没有看到 Return-Path 标头被设置(它应该被设置吗?),这让我认为大多数时候它们根本没有被发送回来。

2 个赞

这里也仍然存在问题。尽管我之前说过,但现在看来这些链接都不起作用了,回到了站点启动时的情况。最初这似乎只影响了在我们正确处理弹回邮件之前(https://meta.discourse.org/t/handling-bouncing-e-mails/45343)的弹回邮件。

3 个赞

我刚注意到错误日志中有很多类似的警告:

无法处理电子邮件:Email::Receiver::AutoGeneratedEmailError

收到:来自 ...
	用于 <bounce+f7e463.5f70e9-...@forum.example.com>; ...
主题:您的邮件无法送达

也许这就是为什么 Discourse 没有退回邮件的任何详细信息的原因。

我在日志中没有看到这些错误,但问题仍然存在。当我在“Bounced email list”中点击某个条目的“Email Type”值时,我会收到“An error occurred: Discourse::NotFound”。

如果勾选“警告”,会怎么样?

它已经被选中了。我往日志里回溯了一下,虽然我看到了一些偶尔的邮件相关信息,但我没有看到你提到的那些。

我在 Mailgun 也遇到了同样的问题。主机不同,所以不是那个问题!

我想知道 Mailgun 的 VERP 设置配置说明是否存在问题:

2 个赞

这个问题已经存在一段时间了,但直到我试图调查为什么目前收到如此多的退信时才开始出现问题。

问题似乎是“邮件类型”列中没有链接,并且:information_source:图标(红箭头)后面也没有内容:

当我点击这些时,我会得到这个:

查看页面代码,HTML中的锚点标签似乎完全缺少 href

我已经为 Mailgun 配置了 VERP,而且除此之外它似乎运行良好。

1 个赞

当 Discourse 未处理退信响应时,这就是预期的行为。如果 Discourse 收到退信,该功能就能正常工作,否则它将对所有退信显示此响应。

您能否根据 Configure VERP to handle bouncing e-mails 仔细检查并运行测试?

1 个赞

在这种情况下,更好的消息会更好。

您是不是想说,如果 Discourse 仅通过 Mailgun 网页钩子得知弹回,那么弹回的详细信息永远不会发送到 Discourse。是这样吗?

如果正确——是否有办法将这些详细信息发送到 Discourse 并与 Discourse 收到的弹回信息记录和显示在同一位置?我认为 Mailgun API 可以做到这一点 ("Discourse::NotFound" error when click "Email Type" field on admin/email/bounced - #8 by Jonathan5)。

在什么情况下 Discourse 会处理弹回而不是外部电子邮件服务?(我知道 Discourse 可以弹回/拒绝电子邮件,但我的意思是处理从预期电子邮件收件人那里收到的弹回消息。)

3 个赞

同意。如果某样东西实际上没有坏,它就不应该看起来坏了。Discourse 当然可以提供更令人放心的信息。

3 个赞