Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem parsing AWS SNS messages on Mautic v5.1 #5

Open
jfgomes opened this issue Aug 21, 2024 · 1 comment
Open

Problem parsing AWS SNS messages on Mautic v5.1 #5

jfgomes opened this issue Aug 21, 2024 · 1 comment

Comments

@jfgomes
Copy link

jfgomes commented Aug 21, 2024

Using this plugin, I’m trying to parse the payload that comes from an AWS SNS topic in Mautic to get the bounces.

However, according to the AWS documentation , the $notificationType is the field that indicates whether it’s a bounce or a complaint for instance.

But it seems that this plugin is treating first the type as “Notification,” and only inside the “Message” we have the “notificationType.”. Thats why the messages are discarded because all Messages are 'Notification' no mater if it is a bounce or a complaint .

Can you help?
Is this plugin ready to be used on Mautic versions > 5?

The AWS payload example is:

{
“Type”: “Notification”,
“Message”: {
“notificationType”: “Bounce”,
“bounce”: {
“feedbackId”: “0100019173f23467-c378b544-ae07-4410-9d46-fc2cb18c2c48-000000”,
“bounceType”: “Permanent”,
“bounceSubType”: “General”,
“bouncedRecipients”: [
{
“emailAddress”: “bounce@simulator.amazonses.com”,
“action”: “failed”,
“status”: “5.1.1”,
“diagnosticCode”: “smtp; 550 5.1.1 user unknown”
}
],
“timestamp”: “2024-08-21T07:58:58.000Z”,
“remoteMtaIp”: “52.7.8.245”,
“reportingMTA”: “dns; a48-121.smtp-out.amazonses.com
},
“mail”: {
“timestamp”: “2024-08-21T07:58:58.260Z”,
“source”: “xxxx”,
“sourceArn”: “xxxxx”,
“sourceIp”: “94.63.xxx.xxx”,
“callerIdentity”: “root”,
“sendingAccountId”: “983084435241”,
“messageId”: “0100019173f232d4-4d4c06b8-43cc-4cf8-84d3-df4cc745b33f-000000”,
“destination”: [
bounce@simulator.amazonses.com
],
“headersTruncated”: false,
“headers”: [
{
“name”: “From”,
“value”: “xxxxx”
},
{
“name”: “To”,
“value”: “bounce@simulator.amazonses.com
},
{
“name”: “Subject”,
“value”: “xxxx”
},
{
“name”: “MIME-Version”,
“value”: “1.0”
},
{
“name”: “Content-Type”,
“value”: “multipart/alternative; boundary="----=_Part_266922_295198094.1724227138260"”
}
],
“commonHeaders”: {
“from”: [
“xxxx”
],
“to”: [
bounce@simulator.amazonses.com
],
“subject”: “xxxx”
}
}
}
}

@pabloveintimilla
Copy link
Owner

Hi, please check that in AWS SES suscription is enabled raw message delivery.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants