【问题标题】:Distinguish bounce and OOTO with Amazon SES使用 Amazon SES 区分反弹和 OOTO
【发布时间】:2013-09-03 01:18:33
【问题描述】:

我正在使用 Amazon SES 发送电子邮件并使用 SNS 处理通知。我刚刚意识到我一直在将 OOTO 消息处理为退回邮件,我想解决这个问题,以便正确区分这两者。

OOTO 和退回通知都有"notificationType":"Bounce"

通知中必须有一些其他信息可以让您区分退回和 OOTO,但我在任何地方都找不到此文档。有人知道吗?

【问题讨论】:

  • 这和amazon-sns有关系吗?
  • @tster,是的,第一句话说我正在使用 SNS 处理通知。
  • 您很想知道如何区分 OOTO 和来自 SES 的退回通知。我认为您使用 SNS 做某事的事实无关紧要。我是SNS专家,经常查看amazon-sns标签,我觉得这个问题和它没有任何关系。

标签: amazon-web-services amazon-ses


【解决方案1】:

提供一些额外的信息来帮助他人。下面是从 SES 模拟器收到的电子邮件地址 ooto@simulator.amazonses.com、bounce@simulator.amazonses.com 和 suppresslist@simulator.amazonses.com 的示例消息。下面还有对应于生产中的 OOTO 电子邮件的消息,这与模拟的不同。

看起来您可以使用“bounceType”来区分 OOTO 和反弹,但如果能从 SES 团队那里得到澄清,那就太好了。在我看来,OOTO 消息不应被视为退回邮件。

来自模拟器的 OOTO:

{
u'mail': {
  u'timestamp': u'2013-09-01T17:21:23.000Z', 
  u'destination': [u'ooto@simulator.amazonses.com'], 
  u'source': u'sender@example.com', 
  u'messageId': u'...'}, 
u'notificationType': u'Bounce', 
u'bounce': {
  u'bounceType': u'Transient', 
  u'bounceSubType': u'General', 
  u'bouncedRecipients': [{u'emailAddress': u'ooto@simulator.amazonses.com'}], 
  u'feedbackId': u'...', 
  u'timestamp': u'2013-09-01T17:21:24.000Z'}
}

生产中的 OOTO:

{
u'mail': {
  u'timestamp': u'2013-09-01T18:45:10.000Z', 
  u'destination': [u'ooto@example.com'], 
  u'messageId': u'...', 
  u'source': u'sender@example.com'}, 
u'notificationType': u'Bounce', 
u'bounce': {
  u'bouncedRecipients': [], 
  u'bounceType': u'Undetermined', 
  u'bounceSubType': u'Undetermined', 
  u'feedbackId': u'...', 
  u'timestamp': u'2013-09-01T18:45:11.000Z'}
}

从模拟器反弹:

{
u'mail': {
  u'timestamp': u'2013-09-01T17:21:20.000Z', 
  u'destination': [u'bounce@simulator.amazonses.com'], 
  u'messageId': u'...', 
  u'source': u'sender@example.com'}, 
u'notificationType': u'Bounce', 
u'bounce': {
  u'bounceType': u'Permanent',
  u'bounceSubType': u'General', 
  u'bouncedRecipients': [{u'action': u'failed', u'status': u'5.1.1', u'diagnosticCode': u'smtp; 550 5.1.1 user unknown', u'emailAddress': u'bounce@simulator.amazonses.com'}], 
  u'feedbackId': u'...', 
  u'timestamp': u'2013-09-01T17:21:20.767Z', 
  u'reportingMTA': u'dsn; a8-96.smtp-out.amazonses.com'}
}

生产反弹:

{
u'mail': {
  u'timestamp': u'2013-09-02T13:39:02.000Z', 
  u'destination': [u'recipient@example.com'], 
  u'messageId': u'...', 
  u'source': u'sender@example.com'}, 
u'notificationType': u'Bounce', 
u'bounce': {
  u'feedbackId': u'...', 
  u'timestamp': u'2013-09-02T13:38:57.000Z', 
  u'reportingMTA': u'dns; b232-135.smtp-out.amazonses.com', 
  u'bounceSubType': u'General', 
  u'bouncedRecipients': [{u'status': u'5.0.0', u'diagnosticCode': u"smtp; 5.1.0 - Unknown address error 550-'Requested action not taken: mailbox unavailable' (delivery attempts: 0)", u'emailAddress': u'recipient@example.com', u'action': u'failed'}], 
  u'bounceType': u'Permanent'}
}

来自模拟器的抑制列表:

{u'mail': {
  u'timestamp': u'2013-09-01T17:21:31.000Z', 
  u'destination': [u'suppressionlist@simulator.amazonses.com'], 
  u'messageId': u'...', 
  u'source': u'sender@example.com'}, 
u'notificationType': u'Bounce', 
u'bounce': {
  u'bounceType': u'Permanent',
  u'bounceSubType': u'Suppressed', 
  u'bouncedRecipients': [{u'status': u'5.1.1', u'emailAddress': u'suppressionlist@simulator.amazonses.com', u'diagnosticCode': u'Amazon SES has suppressed sending to this address because it has a recent history of bouncing as an invalid address. For more information about how to remove an address from the suppression list, see the Amazon SES Developer Guide: http://docs.aws.amazon.com/ses/latest/DeveloperGuide/remove-from-suppressionlist.html ', u'action': u'failed'}],
  u'feedbackId': u'...', 
  u'timestamp': u'2013-09-01T17:21:32.620Z', 
  u'reportingMTA': u'dns; amazonses.com'}
}

【讨论】:

  • 我正在研究这个问题,并试图决定我们是否应该使用 SES。你是说模拟器给你一个不同的bounceType和subBounceType然后在生产中使用?如果真是这样,那就太可怕了。
  • 是的,就是这样。
  • 只有永久跳出计入帐户的官方“跳出率” - 所有暂时或未确定的跳出都不计入。我通常建议主要以自动方式处理永久退回邮件(取消订阅或阻止电子邮件地址),并手动检查所有其他类型以查看是否有必要采取任何措施。有时这些错误中包含一些有用的信息,例如被提供商阻止或发生 DMARC 错误时。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2014-06-23
  • 2014-09-12
  • 1970-01-01
  • 2019-05-08
  • 2012-02-23
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多