12

I'm sending emails with Amazon SES and processing notifications with SNS. I just realized that I have been processing OOTO messages as bounces and I would like to fix that so I properly distinguish the two.

Both OOTO and bounce notifications have "notificationType":"Bounce".

There must be some other information in the notification that allows you to distinguish bounces and OOTOs, but I can't find this documented anywhere. Has anyone figured this out?

tster
  • 17,883
  • 5
  • 53
  • 72
new name
  • 15,861
  • 19
  • 68
  • 114
  • Does this have anything to do with amazon-sns? – tster Jul 01 '13 at 17:49
  • @tster, yes, first sentence says that I am processing notifications with SNS. – new name Jul 02 '13 at 02:51
  • You are askign how to tell the different between an OOTO and a bounce notification from SES. The fact that you are using SNS to do something is irrelevant I think. I am an SNS expert, and often check the amazon-sns tag, and I think this question doesn't have any relevance to it. – tster Jul 03 '13 at 17:51

1 Answers1

8

Providing some additional information to help others. Below are example messages received from the SES simulator for the email addresses ooto@simulator.amazonses.com, bounce@simulator.amazonses.com, and suppressionlist@simulator.amazonses.com. Also below is message corresponding to an OOTO email in production, which is different from what is simulated.

Looks like you can use "bounceType" to distinguish OOTO from bounces, but would be nice to get clarity from the SES team. In my opinion, OOTO messages should not be treated as bounces.

OOTO from simulator:

{
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 in production:

{
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'}
}

Bounce from simulator:

{
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'}
}

Bounce in production:

{
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'}
}

Suppression list from simulator:

{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'}
}
new name
  • 15,861
  • 19
  • 68
  • 114
  • I'm looking into this as well as I trying to decide if we should use SES. Are you saying that the simulator is giving you a different bounceType and subBounceType then when used in production? That's horrible if that is indeed the case. – Gary Brunton Oct 14 '13 at 19:25
  • 1
    Yes, that is the case. – new name Oct 15 '13 at 01:55
  • Only permanent bounces count towards the official "bounce rate" of an account - all transient or undetermined bounces do not. I would generally recommend to mainly process permanent bounces in an automated fashion (unsubscribe or block email address) and manually check on all other types to see if any action is even necessary. Sometimes some useful information is contained in these errors, like being blocked by a provider or when a DMARC error occurs. – iquito Feb 29 '16 at 18:18