Mautic Community Forums

Received SES webhook of type 'Notification' but couldn't understand payload

Your software
My Mautic version is: v2.16.2
My PHP version is: 7.3.14

Your problem
My problem is: Errors in log. I’ve not seen any behaviour that looks wrong, but the errors concern me - if they are benign, they shouldn’t be there, and if they’re not then I need to fix something (but I’m not sure what).

These errors are showing in the log:
[2020-05-22 09:38:06] mautic.WARNING: Received SES webhook of type 'Notification' but couldn't understand payload [] []

Steps I have tried to fix the problem: Checked system logs, but nothing relevant.

This message can be safely ignored - it’s a warning, not an error. It doesn’t affect bounce tracking.
Even with the presence of these messages in the log, non-existent email addresses are marked as “Email Bounced” and “Do Not Contact.”

Probably has something to do with SNS changing their notification format since the callback feature was implemented in Mautic. I would double check your SES dashboard in the AWS Management Console to ensure that you only selected your SNS topic for Bounces and Complaints not Deliveries.

You wouldn’t want SNS firing off a notification back to Mautic for every successful delivery, as Mautic would not know how to handle those “success” notifications. That’s something which could potentially lead to this entry in the system log.

Thanks. All looked good on SNS except that I had “Include Original Headers” enabled. I’ve disabled that now, so let’s see whether that helps.

Good to know it can be ignored.

Thanks for bringing this up - I’ve also been getting this warning recently with mautic versions v2.15.3 and v.2.16.0. PHP v7.1.

Bounce and Complaint notifications both don’t work. No one is being marked DNC or Email Bounced. I’ve received hundreds of the above mentioned warnings.

[2020-05-22 09:38:06] mautic.WARNING: Received SES webhook of type 'Notification' but couldn't understand payload [] []

I have no delivery or any other type of notification enabled.
Also a few periodic errors like this which appear specific to the bounce payload:

mautic.NOTICE: PHP Notice - Undefined index: diagnosticCode - in file /var/www/html/**/app/bundles/EmailBundle/Swiftmailer/Transport/AmazonTransport.php - at line 147 {"payload":{"Type":"Notification","MessageId”:”**”,”TopicArn":"arn:aws:sns:us-east-1:**”,”Message":"{\"notificationType\":\"Bounce\",\"bounce\":{\"bounceType\":\"Permanent\",\"bounceSubType\":\"General\",\"bouncedRecipients\":[{\"emailAddress\":\"nancybwallace@suddenlink.net\",\"action\":\"failed\",\"status\":\"4.2.2\"}],\"timestamp\":\"2020-05-26T14:32:09.000Z\",\"feedbackId\”:\”**\”,\”reportingMTA\":\"dns; dalifep04.suddenlink.net\"},\"mail\":{\"timestamp\":\"2020-05-26T13:55:08.000Z\",\"source\”:\”foo\”,\”sourceArn\”:\”foo\”,\”sourceIp\”:\”**\”,\”sendingAccountId\”:\”**\”,\”messageId\”:\”**\”,\”destination\”:[\”foo@suddenlink.net\"]}}","Timestamp":"2020-05-26T14:32:10.705Z","SignatureVersion":"1","Signature":"","SigningCertURL":"https://sns.us-east-1.amazonaws.com","UnsubscribeURL":""},"message":{"notificationType":"Bounce","bounce":{"bounceType":"Permanent","bounceSubType":"General","bouncedRecipients":[{"emailAddress":"","action":"failed","status":"4.2.2"}],"timestamp":"2020-05-26T14:32:09.000Z","feedbackId":"","reportingMTA":"dns;"},"mail":{"timestamp":"2020-05-26T13:55:08.000Z","source":"","sourceArn":"/","sourceIp":"","sendingAccountId":"","messageId":"","destination”:[“foo@suddenlink.net"]}},"bouncedRecipients":[{"emailAddress”:”foo@suddenlink.net","action":"failed","status":"4.2.2"}],"bouncedRecipient":{"emailAddress”:”foo@suddenlink.net","action":"failed","status":"4.2.2"}} []

I haven’t seen any issue brought up in the mautic repo, but I’ll keep looking and/or open it myself. I’m also going to contact SES to see if they’ve changed their payload structure.

Hmm, DNC and bounce work for me, sending to the SES test accounts.