Mautic & Amazon SES-SNS bounce handling

Thanks I’ll try to dig into this…
the email bounce@simulator.amazonses.com is described here
Testing email sending in Amazon SES - Amazon Simple Email Service Classic

@kuzmany is the flag mautic:broadcast:send --limit=50 --batch=1 only working with the wip PR from @m.abumusa ? or is it currently working like you said in github?
wich would be --limit=50 means 50 emails and --batch=1 means 1 batch per second

Hello,

I had also a problem with mautic (we currently use version 4.0.1) and bounce handling with amazon ses.

I created a subscription in sns and get the confirmation for this.

I created a contact with nope@nope.com and tested the post call with to https://myurl.de/mailer/amazon_api/callback the json

{
    "Type": "Notification",
    "MessageId": "7c2d7069-7db3-53c8-87d0-20476a630fb6",
    "TopicArn": "arn:aws:sns:eu-west-1:918057160339:55hubs-mautic-test",
    "Message": "{\"notificationType\":\"Bounce\",\"bounce\":{\"bounceType\":\"Permanent\",\"bounceSubType\":\"General\",\"bouncedRecipients\":[{\"emailAddress\":\"nope@nope.com\",\"action\":\"failed\",\"status\":\"5.1.1\",\"diagnosticCode\":\"smtp; 550 5.1.1 <nope@nope.com>: Recipient address rejected: User unknown in virtual alias table\"}],\"timestamp\":\"2016-08-17T07:43:12.776Z\",\"feedbackId\":\"0102015697743d4c-619f1aa8-763f-4bea-8648-0b3bbdedd1ea-000000\",\"reportingMTA\":\"dsn; a4-24.smtp-out.eu-west-1.amazonses.com\"},\"mail\":{\"timestamp\":\"2016-08-17T07:43:11.000Z\",\"source\":\"admin@55hubs.ch\",\"sourceArn\":\"arn:aws:ses:eu-west-1:918057160339:identity/nope.com\",\"sendingAccountId\":\"918057160339\",\"messageId\":\"010201569774384f-81311784-10dd-48a8-921f-8316c145e64d-000000\",\"destination\":[\"nope@nope.com\"]}}",
    "Timestamp": "2016-08-17T07:43:12.822Z",
    "SignatureVersion": "1",
    "Signature": "GNWnMWfKx1PPDjUstq2Ln13+AJWEK/Qo8YllYC7dGSlPhC5nClop5+vCj0CG2XN7aN41GhsJJ1e+F4IiRxm9v2wwua6BC3mtykrXEi8VeGy2HuetbF9bEeBEPbtbeIyIXJhdPDhbs4anPJwcEiN/toCoANoPWJ3jyVTOaUAxJb2oPTrvmjMxMpVE59sSo7Mz2+pQaUJl3ma0UgAC/lrYghi6n4cwlDTfbbIW+mbV7/d/5YN/tjL9/sD3DOuf+1PpFFTPsOVseZWV8PQ0/MWB2BOrKOKQyF7msLNX5iTkmsvRrbYULPvpbx32LsIxfNVFZJmsnTe2/6EGaAXf3TVPZA==",
    "SigningCertURL": "https://sns.eu-west-1.amazonaws.com/SimpleNotificationService-bb750dd426d95ee9390147a5624348ee.pem",
    "UnsubscribeURL": "https://sns.eu-west-1.amazonaws.com/?Action=Unsubscribe&SubscriptionArn=arn:aws:sns:eu-west-1:918057160339:nope:1cddd2a6-bfa8-4eb5-b2b2-a7833eb5db9b"
}

This works, I directly got the bounce flag in mautic.

But when I remove this flag and send a manuall email to this contact nothing happens.

I get an bounce email (“Undeliverable: Testmail” from MAILER-DAEMON@eu-central-1.amazonses.com), but no “bounce flag” in mautic.

I’m quite new to amazon ses/sns so I’m not sure if I configured it the right way. I created a topic in sns and a subscriotion with https://myurl.de/mailer/amazon_api/callback. This subscription is confirmed. Because this was not working I also set the bounce notification in my ses identity to my sns-mautic topic.

And after this it works! After sending another test-email I get the bounce flag!

Maybe this helps another newbie to configute mautic with amazon ses/sns.

Best regards,

Timo

Hey Parker thanks for your support.
Can you give more details how we can enable " I also set the bounce notification in my ses identity to my sns-mautic topic."

this is my actual configuration that is NOT working.

Hi,

I have just set the bounce and nicht the complaint and I set include original headers to no.

As you can see we have similar configuration but without the same behaviour :frowning:

And do you have checked to make a post request (for example with postman)? Is this working?

I’ve figured out my issue and it was user error (sorry). For others who might have made the same mistake, in the Amazon SES verified identities I set up the notification services against the domain instead of against each verified email address. You need to set up the notifications for each email address. Hopefully this helps someone in future.

In my case I just set the notification for the domain ;-.

Thanks for the hits… I’ve set up notifications for BOTH domains and users.
Let me try to remove the domain notification…

As @iparker mentioned you need to set “Include original headers” to “no”
It is set to “yes” in your image

Hi @m.abumusa, hi @joeyk,
can we somehow help to get the feedback for the new amazon ses plugin to work?
I couldn’t find a pr or something for that. Is this in progress right now?
It would be amazing to get the bounce/complaint feedback from amazon ses to work with mautic 5 :slight_smile:

Hey Alex,

I’m sure you found the plugin, that does the API sending for SES under M5, and you noticed, that the SNS part is missing. (Or maybe you use the symphony transport)

We have not done any work on this because we don’t have any M5 installs yet in production due to the bounce / transactional emails issue with Mautic 5.

But I’m hoping it will be solved, and I think using the Mailjet plugin as basis we could cook up something…

Probably the key is here:

@ekke are you using SES/SNS, maybe you want to help with this? :slight_smile:
Joey

Thanks for the quick reply.
I am playing around with the symphony transport. And yes, this is a good starting point. I will take a closer look and see what I can do.