SNS notifications "recipients" does not contain the whole recipients list

0

Hi,

I've set up a SES Configuration Set with Event Notifications directed to SNS.

When I receive a notification, I noticed that the "mail.destination" field does not always contains the whole recipients list, even though the docs (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/event-publishing-retrieving-sns-contents.html) say:

destination
A list of email addresses that were recipients of the original mail.

Which implies, IMO, that all addresses should be present.

See this example:

{
"mail": {
"source": "contact@.com",
"messageId": "0102016ddf1f227e-5f871b08-9e8d-43af-b920-bfa47bfb6f43-000000",
"timestamp": "2019-10-18T13:47:02.654Z",
"destination": [
"archives@
.com"
],
"commonHeaders": {
"to": [
"CUSTOMER xxxx.yyyy@gmail.com"
],
"bcc": [
"Archives <archives@.com>"
],
"date": "Fri, 18 Oct 2019 15:46:43 +0200",
"from": [
""
.com" <contact@***.com>"
],
"subject": "Confirmation de votre commande",
"messageId": "0102016ddf1f227e-5f871b08-9e8d-43af-b920-bfa47bfb6f43-000000"
}
},
"send": [],
"eventType": "Send"
}

We can clearly see from the headers that the message has a To: and a Bcc: address, but the "mail.destination" field only contains the Bcc address.


Similarly, sometimes the commonHeaders field may not contain all the addresses; see for example:

{
"mail": {
"source": "noreply@.lu",
"messageId": "0102016dd98f16a7-fc5c0bcb-0605-4347-bfcd-8dd7a3fa6faf-000000",
"timestamp": "2019-10-17T11:51:36.359Z",
"destination": [
"XXX@gmail.com",
"YYY@yyy.fr",
"ZZZ@zzz.com"
],
"commonHeaders": {
"cc": [
"
YYY@yyy.fr"
],
"to": [
"*** XXX@gmail.com"
],
"date": "Thu, 17 Oct 2019 11:51:35 +0000",
"from": [
"*** <noreply@***.lu>"
],
"messageId": "0102016dd98f16a7-fc5c0bcb-0605-4347-bfcd-8dd7a3fa6faf-000000"
}
},
"send": [],
"eventType": "Send"
}

This message had 3 recipients:

Here, the event does contain all recipient addresses in the "mail.destination" field, but neither the "headers" not the "commonHeaders" fields contains the Bcc address.

Are these bugs in Amazon SES?

Note: I've removed or replaced sensitive information in the events above, but they're otherwise genuine, including the Message IDs if someone from Amazon wants to investigate them.

Edited by: Client d'Amazon on Oct 18, 2019 7:37 AM

BMRK
asked 5 years ago445 views
1 Answer
0

I finally figured it out.

Depending on the recipients of the email, the email you send may be split into several SES messages (in which case, you receive several Message-IDs).

When this is the case, each message will have its own, partial list of destinations (recipients).

I was mislead by the fact that sometimes, you may have a single message ID, even though you're sending to multiple recipients. This happens when the recipients are on the same email domain (e.g. gmail.com). This also happens if you're sending to multiple recipients using the same email service in the background (e.g. G Suite). So I did not immediately understand that the message was being split into several Message IDs.

I still haven't figured out when the Bcc header does or does not show, however.

BMRK
answered 5 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions