# How to track failed email delivery?

**URL:** <https://forum.mautic.org/t/how-to-track-failed-email-delivery/1856>\
**Category:** Product Support\
**Created:** [May 19, 2015, 11:48am UTC](https://forum.mautic.org/t/how-to-track-failed-email-delivery/1856 "2015-05-19T11:48:17Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![aarsla](https://avatars.discourse-cdn.com/v4/letter/a/c4cdca/32.png) [@aarsla](https://forum.mautic.org/u/aarsla)\
**Post date:** [May 19, 2015, 11:48am UTC](https://forum.mautic.org/t/how-to-track-failed-email-delivery/1856/1 "2015-05-19T11:48:17Z")

</div>

I have send test email to 2 email addresses, one of which was fake.lead@nonexistent.test.  
  
Obviously, postfix returned

Code:

May 19 12:27:03 mautic postfix/smtp[8445]: C6870729E: to=, relay=none, delay=0.49, delays=0.4/0.01/0.09/0, dsn=5.4.4, status=bounced (Host or domain name not found. Name service error for name=nonexistent.test type=AAAA: Host not found)

  
However, this was not reflected in Mautic GUI - Graph never shows "Failed" column which is always at zero.  
  
What do I need to do in order to catch failed/bounced messages?  
Thank You

---

<div class="post-metadata">

**Author:** ![aarsla](https://avatars.discourse-cdn.com/v4/letter/a/c4cdca/32.png) [@aarsla](https://forum.mautic.org/u/aarsla)\
**Post date:** [May 19, 2015, 11:48am UTC](https://forum.mautic.org/t/how-to-track-failed-email-delivery/1856/2 "2015-05-19T11:48:17Z")

</div>

I have send test email to 2 email addresses, one of which was fake.lead@nonexistent.test.  
Obviously, postfix returned

```auto
May 19 12:27:03 mautic postfix/smtp[8445]: C6870729E: to=<fake.lead@nonexistent.test>, relay=none, delay=0.49, delays=0.4/0.01/0.09/0, dsn=5.4.4, status=bounced (Host or domain name not found. Name service error for name=nonexistent.test type=AAAA: Host not found)
```

However, this was not reflected in Mautic GUI - Graph never shows “Failed” column which is always at zero.

What do I need to do in order to catch failed/bounced messages?  
Thank You

---

<div class="post-metadata">

**Author:** ![wessel](https://avatars.discourse-cdn.com/v4/letter/w/53a042/32.png) [@wessel](https://forum.mautic.org/u/wessel)\
**Post date:** [May 22, 2015, 12:42pm UTC](https://forum.mautic.org/t/how-to-track-failed-email-delivery/1856/3 "2015-05-22T12:42:12Z")

</div>

Hi,

We had the same problem, we send with SES and got a high bounce rates, but Mautic didn’t know about the bounces.

We dug into the code, and it turns out the SES api returns the data, but Mautic isn’t capturing it. A developer on my team is implementing it now (although only for SES) and we’ll be contributing that code to the project.

---

<div class="post-metadata">

**Author:** ![wbuist](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/wbuist/32/21_2.png) [@wbuist](https://forum.mautic.org/u/wbuist)\
**Post date:** [May 25, 2015, 7:43am UTC](https://forum.mautic.org/t/how-to-track-failed-email-delivery/1856/4 "2015-05-25T07:43:47Z")

</div>

I have the same issue with Mandrill as the sender.

---

<div class="post-metadata">

**Author:** ![ankitpr89](https://avatars.discourse-cdn.com/v4/letter/a/b2d939/32.png) [@ankitpr89](https://forum.mautic.org/u/ankitpr89)\
**Post date:** [May 26, 2015, 4:27am UTC](https://forum.mautic.org/t/how-to-track-failed-email-delivery/1856/5 "2015-05-26T04:27:37Z")

</div>

I feel this issue can be easily solved.  
Given Mautic has some endpoint notification file to accept the pings from SMTPs.  
In case of Amazon SES, notification can be sent through Amazon SNS and in case of Mandrill, this can be done through Mandrill Webhooks.  
After, notification has been received, Mautic should also process to remove bounces, spammed and unsubscried emails from the list. This helps to keep the email list clean and healthy.

Also, if Mautic doesnot have this auto list cleaning feature, then Amazon SES will block this application very soon.

---

<div class="post-metadata">

**Author:** ![wbuist](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/wbuist/32/21_2.png) [@wbuist](https://forum.mautic.org/u/wbuist)\
**Post date:** [May 26, 2015, 7:16am UTC](https://forum.mautic.org/t/how-to-track-failed-email-delivery/1856/6 "2015-05-26T07:16:35Z")

</div>

Thanks for that, it looks like an ideal solution.

Is there anywhere that that is documented so I can understand how to implement it?

Regards

William

---

<div class="post-metadata">

**Author:** ![chad.windnagle](https://avatars.discourse-cdn.com/v4/letter/c/7feea3/32.png) [@chad.windnagle](https://forum.mautic.org/u/chad.windnagle)\
**Post date:** [May 26, 2015, 1:35pm UTC](https://forum.mautic.org/t/how-to-track-failed-email-delivery/1856/7 "2015-05-26T13:35:59Z")

</div>

Hi all

So - exciting news! Mautic will soon be adding Mandril webhook support. In fact you can test it now:

[https://github.com/mautic/mautic/pull/429](https://github.com/mautic/mautic/pull/429)

This will post back failed messages from Mandrill to Mautic and tell you what happened to all the messages you sent. This is already merged in the 1.0.6 package, so as soon as we release that it’ll be added as a new feature. If you’re running a dev version of Mautic code you can pull in that PR and test it.

---

<div class="post-metadata">

**Author:** ![ramez\_rafla](https://avatars.discourse-cdn.com/v4/letter/r/8c91f0/32.png) [@ramez\_rafla](https://forum.mautic.org/u/ramez_rafla)\
**Post date:** [October 17, 2015, 5:23pm UTC](https://forum.mautic.org/t/how-to-track-failed-email-delivery/1856/8 "2015-10-17T17:23:34Z")

</div>

@chad.windnagle ,  
Thanks for the update. Any news on bounces handling with the Amazon SES API?  
Thanks

---

<div class="post-metadata">

**Author:** ![escopecz](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/escopecz/32/370_2.png) [@escopecz](https://forum.mautic.org/u/escopecz)\
**Post date:** [October 19, 2015, 9:57am UTC](https://forum.mautic.org/t/how-to-track-failed-email-delivery/1856/9 "2015-10-19T09:57:15Z")

</div>

I’m not sure if Amazon SES need some special touch, but bounces handling had been introduced in Mautic 1.2.0.

[https://github.com/mautic/mautic/releases/tag/1.2.0](https://github.com/mautic/mautic/releases/tag/1.2.0)

---

<div class="post-metadata">

**Author:** ![ramez\_rafla](https://avatars.discourse-cdn.com/v4/letter/r/8c91f0/32.png) [@ramez\_rafla](https://forum.mautic.org/u/ramez_rafla)\
**Post date:** [October 19, 2015, 11:44am UTC](https://forum.mautic.org/t/how-to-track-failed-email-delivery/1856/10 "2015-10-19T11:44:46Z")

</div>

Thanks @escopecz for your reply,

Amazon SES has its own API to handle bounces. See step 5 and 6 here for setup instructions:  
[https://sendy.co/get-started](https://sendy.co/get-started)

Right now, Mautic is only using it as an SMTP server. Truth is, if Amazon SES is implemented with proper bounces / spam handling, Mautic would do what Sendy does and way more, for a fully-integrated platform.

Amazon SES remains one of the most powerful and oft-used email tools for marketing.

---

<div class="post-metadata">

**Author:** ![ramez\_rafla](https://avatars.discourse-cdn.com/v4/letter/r/8c91f0/32.png) [@ramez\_rafla](https://forum.mautic.org/u/ramez_rafla)\
**Post date:** [November 5, 2015, 7:36pm UTC](https://forum.mautic.org/t/how-to-track-failed-email-delivery/1856/11 "2015-11-05T19:36:02Z")

</div>

@ehill,

That’s my fault for not writing and pushing docs. Will get to it soon.

You have to setup Amazon SES bounces to go to mailbox (which the mail box that you send from) and set up bounce handling the normal way in Mautic. I added a regexp in the bounces analysis code of Mautic to catch the bounces response from Amazon SES (which was accepted).

You can test it easily by sending a test marketing email to a bogus email (using SES of course) and running bounce handling (from the CLI). I believe you should see info in the Mautic logs (available from the UI as well)

Thanks

---

<div class="post-metadata">

**Author:** ![ehill](https://avatars.discourse-cdn.com/v4/letter/e/cdc98d/32.png) [@ehill](https://forum.mautic.org/u/ehill)\
**Post date:** [November 5, 2015, 7:32pm UTC](https://forum.mautic.org/t/how-to-track-failed-email-delivery/1856/12 "2015-11-05T19:32:04Z")

</div>

@escopecz It still is not clear whether the 1.2.0 bounce management can effectively work with Amazon SES. Do you have any use cases?

---

<div class="post-metadata">

**Author:** ![escopecz](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/escopecz/32/370_2.png) [@escopecz](https://forum.mautic.org/u/escopecz)\
**Post date:** [November 5, 2015, 7:37pm UTC](https://forum.mautic.org/t/how-to-track-failed-email-delivery/1856/13 "2015-11-05T19:37:09Z")

</div>

I don’t have Amazon SES account, sorry. It’d be great if some community member who has it working could write a documentation about it…

Ahh, thanks, @ramez_rafla ! That’d be really great.

---

<div class="post-metadata">

**Author:** ![ehill](https://avatars.discourse-cdn.com/v4/letter/e/cdc98d/32.png) [@ehill](https://forum.mautic.org/u/ehill)\
**Post date:** [November 8, 2015, 11:35pm UTC](https://forum.mautic.org/t/how-to-track-failed-email-delivery/1856/14 "2015-11-08T23:35:11Z")

</div>

@ramez_rafla Did you also implement Amazon SNS for bounce management?

---

<div class="post-metadata">

**Author:** ![ramez\_rafla](https://avatars.discourse-cdn.com/v4/letter/r/8c91f0/32.png) [@ramez\_rafla](https://forum.mautic.org/u/ramez_rafla)\
**Post date:** [November 9, 2015, 1:59am UTC](https://forum.mautic.org/t/how-to-track-failed-email-delivery/1856/15 "2015-11-09T01:59:22Z")

</div>

@ehill, Nope, didn’t need to. All SNS bounce management functionalities (that we needed) are available with the mailbox traversal approach.

---

<div class="post-metadata">

**Author:** ![ehill](https://avatars.discourse-cdn.com/v4/letter/e/cdc98d/32.png) [@ehill](https://forum.mautic.org/u/ehill)\
**Post date:** [November 9, 2015, 3:07am UTC](https://forum.mautic.org/t/how-to-track-failed-email-delivery/1856/16 "2015-11-09T03:07:27Z")

</div>

@ramez_rafla Thanks. We have been frustrated with our inability (or maybe stupidity) in trying to get this set up. We will revert back to the email approach.

---

<div class="post-metadata">

**Author:** ![ehill](https://avatars.discourse-cdn.com/v4/letter/e/cdc98d/32.png) [@ehill](https://forum.mautic.org/u/ehill)\
**Post date:** [November 9, 2015, 3:09am UTC](https://forum.mautic.org/t/how-to-track-failed-email-delivery/1856/17 "2015-11-09T03:09:07Z")

</div>

@escopecz We inadvertently entered an email address for the Bounce Management that was not configured and it appears the Mautic continues to try and connect, effectively preventing us from accessing any configuration function. Any suggestions about the appropriate approach?

---

<div class="post-metadata">

**Author:** ![escopecz](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/escopecz/32/370_2.png) [@escopecz](https://forum.mautic.org/u/escopecz)\
**Post date:** [November 9, 2015, 7:55am UTC](https://forum.mautic.org/t/how-to-track-failed-email-delivery/1856/18 "2015-11-09T07:55:15Z")

</div>

Could you describe how is Mautic preventing you from accessing any configuration function? A screenshot? Some error message in the logs?

---

<div class="post-metadata">

**Author:** ![ehill](https://avatars.discourse-cdn.com/v4/letter/e/cdc98d/32.png) [@ehill](https://forum.mautic.org/u/ehill)\
**Post date:** [November 9, 2015, 2:57pm UTC](https://forum.mautic.org/t/how-to-track-failed-email-delivery/1856/19 "2015-11-09T14:57:25Z")

</div>

@escopecz We disabled the IMAP module and can now access the screen. Checking the log file and will provide shortly.

---

<div class="post-metadata">

**Author:** ![silavapi](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/silavapi/32/7424_2.png) [@silavapi](https://forum.mautic.org/u/silavapi)\
**Post date:** [February 2, 2020, 10:57pm UTC](https://forum.mautic.org/t/how-to-track-failed-email-delivery/1856/20 "2020-02-02T22:57:12Z")

</div>


