Are running into the same issue as @zhammer on a 2.16.0 instance running PHP 7.3.
The SNS subscription confirms OK but Mautic is not picking up the JSON payload from Amazon. Amazon sends a “Delivery Status Notification” as a fallback, and the bounced email address is not marked as “Email Bounced” in Mautic.
I suspect the PHP version may be the issue.
Will try installing a fresh instance downgraded to PHP 7.2 and report back on the results.
Changing the port as @fabi states in the AmazonTransport.php file did not help for us.
Commented on the open Github issue for anybody who wants to follow along
After doing more digging today, this might be related to having CloudFlare in front of the Mautic instance that is having trouble receiving bounce/complaint notifications from SNS. Downgrading to 7.2 did not help. Haven’t had a chance to test whether its related to CloudFlare yet, but @zhammer by any chance, did you also have CloudFlare in front of your instance?
Edit: Disabled CloudFlare and tested against a fresh instance running PHP 7.2.23 and Mautic 2.16.0. Retrieved the SNS log from Amazon CloudWatch - looks OK from their end. But contact is still not marked as bounced.
Edit 2: What looked like a successful notification above wasn’t actually a bounce notification. It was just Amazon’s confirmation request. No new events were showing up in SNS when sending to the bounce simulator (or other non-existent inboxes).
Switching to a different Amazon SES region fixed the problem for us!
With eu-west-1 (Ireland) instead of us-west-1 (N Virginia), the bounce notification worked right away with the same instance that was having problems earlier. So it was actually Amazon failing to send the callback notification to Mautic, not a Mautic bug. Anyone having issues - try confirming your domain in a different SES region.
finally i managed a fully working SES-integration with Mautic !
E-Mail Sending & SNS-Webhook Bounce management is working.
i forgot to choose my SNS-Subscription in SES under E-mail-adresses > mydomain.com > Notifications > edit configuration > Bounces/complaints
I had it set up for Domains-tab, but i forgot to do it for e-mail-tab too.
I tried everything before including changing ports, changing the AmazonTransport.php file and different mautic settings, BUT i just forgot to setup this one thing in SES. Right now i’m using all the default mautic & server settings, so mautic should work out of the box with SNS-Webhook. I’m using 2.16.0 hosted on Digital-Ocean 5$ droplet managed with runcloud panel.
Under configurations in mautic i choosed “amazon ses”.
I tried AWS location Nord-Virginia & Oregon. Both work fine now.
Somehow i had problems at the beginning to get my webhook confirmed by Amazon (Nord Virginia). It was still in “pending verification” state. Changing the AmazonTransport.php file as stated above worked for me. But now i changed it back to default and it works fine…i don’t know why.
Oregon worked at first try, but at the moment i’m using Nord virginia again.
@fabi interesting! I didn’t realize there were different notification settings for emails directly. I had been setting notifications at the domain level. It’ll be interesting to see if this was my issue as well!
What’s the current mechanism for reporting a bug? This is definitely a bug, having Mautic assume the port and crypto settings are all the same when they clearly aren’t. It’s not a huge issue once you know the solution, but to have to go edit the files after every upgrade is less than sub-optimal.
Thank you so much for this. As someone new to the Amazon landscape I had no idea why bounces were not working when sent to the mailbox simulator. The default setting for the email address under SES overrides the domain setting. I thought it was odd that I was still receiving bounce email notifications in my inbox despite turning it off at the domain level.
I was still getting access log hits from Amazon SNS due to my domain setting - which apparently was a big red herring as you say.
I am not sure if this is obvious to those who used Amazon for a while, but I think the Mautic documentation should be updated to include this since it is probably how a lot of people will have it set up (verifying both the domain and sender email address).
For those running into bounces in separate folders (initially hidden) and Mautic not reading from these, take note of https://blog.cpanel.com/plus-addressing-in-cpanel/ that does this since cPanel & WHM v58
You’ll need to go into the cPanel mailbox setup to change this new default behaviour by mailbox (at least for the mailbox receiving the bounce emails) then all bounces got into one folder and that is then used in Mautic mail config (don’t forget the cron jobs to read mail and process segements)
There is another way of showing bounce in email graph.
Go to SES->domains->select your domain->Notifications->Edit Configurations->
check Include original headers -> save config.
Bounces will show up in email graphs
I’ve the same problem. My Mautic is hosted on a VPS. It worked for 205 contacts, it added them to the bounce segment which has filter (bounce=yes) but after that, it started to create a single folders for every bounce email below the main folders (inbox, sent, etc.). I don’t know why this happened. Any new bounce email now doesn’t go to the bounce segment, it goes inside a single separate folder. Testing the IMAP settings was successful on port 993 and SSL. I couldn’t find any helpful info about this problem. Please if you fixed this error, let me know. It’s really very important to avoid sending to bounced emails.
This is a pretty large topic. I think if you don’t want to manage your own email reputation, then you need to get something like Amazon SES, Sendgrid, Mailgun etc.
They all have their own bounce management that integrates with Mautic.