配置 VERP 以处理退回的电子邮件

设置反弹处理

Discourse 使用 可变信封退回路径 (VERP) 技术来处理弹出的电子邮件。

要启用 VERP,请使用包含 + 符号的电子邮件地址模板设置“reply by email address”站点设置。默认的
replies+%{reply_key}@discourse.example.com
……工作正常。如果您使用的是您自己或您公司的电子邮件服务器,那么就这样了 :tada:

您的 Discourse 实例必须能够接收发送到此地址的电子邮件。这应该可以通过 POP 正常工作,但我们强烈推荐自托管站点的直接投递入站邮件

但是,如果您使用第三方电子邮件服务,则需要启用 VERP,或按如下所示激活其 webhooks

MailGun

  1. 登录 MailGun 并转到您的仪表板;在左侧栏中查找 发送Webhooks 页面。
  2. 选择 配置 选项卡并复制 HTTP 签名密钥
  3. 您的 Discourse 站点中,使用您的 HTTP 签名密钥 设置 Mailgun API key 站点设置
  4. 返回 Mailgun,单击 添加 Webhook 按钮(选择 域级别)并将 HTTP post URL 设置为 https://your.discourse/webhooks/mailgun。测试此项。
  5. 选择 永久失败临时失败,仔细检查域,然后创建 Webhook。

SendGrid

  • 登录 SendGrid 并转到邮件设置
  • 展开 事件 Webhook 设置,如果尚未启用,则启用它
  • 单击 编辑HTTP POST URL 设置为 http://your.discourse/webhooks/sendgrid
  • 确保选择了以下 3 个操作: 已丢弃已推迟已反弹
  • 单击 :white_check_mark: 保存您的更改

MailJet

  • 登录 MailJet 并转到事件跟踪
  • 检查 反弹 事件
  • 端点 URL 设置为 http://your.discourse/webhooks/mailjet
  • 选中 分组事件 列中的 :white_medium_square:
  • 单击 save 按钮

SparkPost

  • 登录 SparkPost 并转到您的仪表板
  • 从左侧菜单图标中选择 帐户
  • 从菜单中选择 Webhooks ( SparkPost )
  • 选择 New Webhook
  • Webhook 名称 输入一个友好的值,例如 Discourse Forum
  • 输入 目标 URLhttp://your.discourse/webhooks/sparkpost
  • 选择 Add Webhook

Amazon Simple Email Service (AWS SES)

  • 在 Discourse 上:
    • 如 OP 顶部所述,设置 reply by email enabledreply by email address
    • 设置 manual polling enabled
  • 在 AWS 上:
    • 创建一个 SNS 主题
    • 为创建的主题创建一个 SNS 订阅,作为指向 https://your.discourse/webhooks/aws 的 HTTPS
    • 转到 SES > 验证的身份,选择您的站点域,然后转到“通知”选项卡。编辑您的反馈通知。将“反弹反馈”和“投诉反馈”设置为您刚刚创建的 SNS 主题

Postmark

  • 登录 Postmark,然后选择用于发送 Discourse 电子邮件的服务器
  • 选择与 Discourse 电子邮件相关的消息流,通常是默认事务性流
  • 单击 Webhooks
  • 单击 添加 Webhook
  • 输入 Webhook URLhttp://your.discourse/webhooks/postmark
  • 在“我们应该发送哪些事件?”下,选中 投递垃圾邮件投诉
  • 向下滚动并单击 保存 Webhook

测试反弹

为确保一切正常,请执行以下操作:

  1. 在您的站点上使用一个明显不正确的电子邮件地址注册一个新帐户,格式为 bademail@obviously-invalid-domain.comclearly.nobody.has.this.email.address@gmail.com
  2. 等待一段时间让电子邮件完全反弹(如果您愿意,可以检查您提供商的日志——它们通常会显示在“警告”或“错误”日志级别下)
  3. 检查您站点上的 /admin/email/bounced 以确认反弹已被捕获。请记住,这可能需要长达 48 小时,具体取决于重试次数和您的电子邮件提供商的具体逻辑。

配置反弹

可以使用以下站点设置自定义反弹处理:

  • 软反弹分数:当我们的电子邮件地址收到临时反弹时,添加到用户“反弹分数”的分数
  • 硬反弹分数:当我们的电子邮件地址收到永久(或未知)反弹时,添加到用户“反弹分数”的分数
  • 反弹分数重置天数:在我们收到无反弹邮件的天数内,我们可以将用户的“反弹分数”重置为 0
  • 反弹分数阈值:达到此分数阈值后,我们将停止向用户发送非紧急电子邮件

最后由 @SaraDev2022-07-19T20:00:00Z 查看

51 个赞
Does Discourse use Mailgun's validations feature?
VERP bounce replies ignored when using Mailgun
Postmark bounce support?
Email-in replies thread wrongly
Amazon SES/SNS email complaints not received, bounces missing information
What mail service do you recommend?
Confused about VERP, email bounces & additional setup on Discourse
Reply-by-Email was working, now broken
Mailgun "temporarily disabled due to high bounce rate"
How to deactive account of those users who're not receiving emails
Surface data about users with too many bounces
"Discourse::NotFound" error when click "Email Type" field on admin/email/bounced
Configure direct-delivery incoming email for self-hosted sites with Mail-Receiver
"Discourse::NotFound" error when click "Email Type" field on admin/email/bounced
Bounced Email Info Not Found
Fix AWS SNS Bounce
How to block outgoing emails to at anon.forumurl?
Mailgun api key check backward (no API key should be required if bounces handled by mail receiver)
Switching from SMTP to oAuth
Is handling bouncing emails optional, or is it something I definitely need to set up?
Moving from Mailgun to Amazon SES as an amateur
"Discourse::NotFound" error when click "Email Type" field on admin/email/bounced
Mailgun api key, what is it for?
Question about the mail-receiver
Goodbye Sparkpost
Migrated forum with many invalid (bouncing) emails
Amazon SES API - How to setup?
Zero entries in bounced email list
Email suppression list handling
Email suppression list handling
How hard is it to handle Discourse after installation
Set up mail-receiver, but now site won't send any emails?
Installation by the book
Too many user emails domains not working lead to mailgun domain disabled: what to do?
Mailgun huge dropped subscriber
Flush bouncing user mail address
Configuring AWS SES for outgoing, bounce, and incoming email
Notes on Silencing or Deleting users
Retrying bounced emails?
Discourse Mailgun Routes
"Discourse::NotFound" error when click "Email Type" field on admin/email/bounced