I’m a big fan of Postmarkapp.com
We use their bounce API to create tickets when emails need attention.
What would it take to expand Discourse’s Bounce Processing to support Postmark?
See:
I’m a big fan of Postmarkapp.com
We use their bounce API to create tickets when emails need attention.
What would it take to expand Discourse’s Bounce Processing to support Postmark?
See:
We only support adding these sorts of things for mail services that have a free tier. Otherwise it doesn’t benefit enough people.
And for our hosted customers, we handle all email, so there’s no reason to do it for our customers.
Also, we haven’t used any “Bounce API” but rather “Bounce Webhooks” which is documented here
您现在会考虑接受关于 Postmark 退信 webhook 支持的 PR 吗?Mailgun 作为官方支持的退信服务提供商之一,现已移除了其免费层。我感觉到,在这个行业中,免费层普遍正在消失:Tell HN: Mailgun lowers free-tier API from 10k to 625 emails per month | Hacker News
我们当然会考虑 PR。如果该提供商与当前支持的提供商差异过大,请尽早沟通,以便我们就您方案的可合并性提供反馈。
我准备提交这个 PR。
使用他们在此处文档中记录的测试 curl 命令,在我的开发实例上测试后,看起来可以正常工作。
我为硬退信和软退信都包含了 spec 测试。
编辑:我现在已经通过他们的 Webhook 测试界面进行了触发测试,看起来确实有效。
我认为这应该没问题:add postmark webhook handling by pfaffman · Pull Request #8919 · discourse/discourse · GitHub
已合并!谢谢!
@wesochuck 建议对 Bounce 类型进行以下更改(Bounce 类型的定义请参阅 Bounce API | Postmark Developer Documentation
为 hard_bounces 添加:
BadEmailAddress – “无效电子邮件地址 — 该地址不是有效的电子邮件地址。”Blocked – “ISP 拦截 — 因内容问题或被列入黑名单而被该 ISP 拦截。”为 Soft bounces 添加:
SMTPApiError – “SMTP API 错误 — 通过 SMTP API 接收邮件时发生错误。”DMARCPolicy – “DMARC 策略 — 因 DMARC 策略而拒绝邮件。”我认为 blocked 是合理的,但对其余部分不太确定。请告诉我您的看法,我将据此提交 PR。
抱歉,我的 PR 无法工作。
首先,Postmark 默认会丢弃 message-id。
其次,Postmark 在 webhook 中包含的 MessageID 并不是邮件中的 Message-ID。
来源:Everything you need to know about SMTP (Simple Mail Transfer Protocol) | Postmark
是否有简单的方法在 outgoing mail 中添加 X-PM-KeepID: true 标头?能否将这一点添加到核心功能中?
如果该问题得到解决,我将查看是否有办法将实际的 Message-ID 包含在 webhook 负载中并相应地处理它。