# How to handle bounces + with own mail server

**URL:** <https://forum.mautic.org/t/how-to-handle-bounces-with-own-mail-server/16438>\
**Category:** Product Support\
**Created:** [October 5, 2020, 9:55am UTC](https://forum.mautic.org/t/how-to-handle-bounces-with-own-mail-server/16438 "2020-10-05T09:55:19Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![frankofno](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/frankofno/32/3455_2.png) [@frankofno](https://forum.mautic.org/u/frankofno)\
**Post date:** [October 5, 2020, 9:55am UTC](https://forum.mautic.org/t/how-to-handle-bounces-with-own-mail-server/16438/1 "2020-10-05T09:55:19Z")

</div>

**Your software**  
CentOS 8.2  
mautic 3.1.1  
php 7.3.22  
mysql Ver 15.1 Distrib 10.3.17-MariaDB

**Your problem**  
My email server is running on  
mail.mydomain.tld

Mautic is running on  
mautic.mydomain.tld

Mailboxes:  
johndoe@mydomain.tld

So i created a contact in mautic with something@mydomain.tld to see how bounces are handled. I get the error notification on the dashboard of mautic (failed to execute campaign), but the contact will not show up in the segment Bounces (filter bounced email = yes)

What else will mautic need, so the bounces are treated correct?

---

<div class="post-metadata">

**Author:** ![EJL](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/ejl/32/12155_2.png) [@EJL](https://forum.mautic.org/u/EJL)\
**Post date:** [October 5, 2020, 12:18pm UTC](https://forum.mautic.org/t/how-to-handle-bounces-with-own-mail-server/16438/2 "2020-10-05T12:18:10Z")

</div>

Did you run the mautic:emails:fetch command via CLI or Cron?

---

<div class="post-metadata">

**Author:** ![frankofno](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/frankofno/32/3455_2.png) [@frankofno](https://forum.mautic.org/u/frankofno)\
**Post date:** [October 5, 2020, 1:33pm UTC](https://forum.mautic.org/t/how-to-handle-bounces-with-own-mail-server/16438/3 "2020-10-05T13:33:18Z")

</div>

yes. tried both now. the contacts are still not showing up in the segment.

cronjobs:

```
 MAILTO=""
 * * * * * php /var/www/mautic/bin/console mautic:segments:update
 * * * * * php /var/www/mautic/bin/console mautic:campaigns:update >/dev/null 2>&1
 * * * * * php /var/www/mautic/bin/console mautic:campaigns:trigger >/dev/null 2>&1
 * * * * * php /var/www/mautic/bin/console mautic:broadcast:send >/dev/null 2>&1
 * * * * * php /var/www/mautic/bin/console mautic:email:fetch >/dev/null 2>&1

```

and the cli gives me:

0 emails processed for {mail.mydomain.tld:993/imap/ssl}INBOX with a criteria of UNSEEN

---

<div class="post-metadata">

**Author:** ![frankofno](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/frankofno/32/3455_2.png) [@frankofno](https://forum.mautic.org/u/frankofno)\
**Post date:** [October 5, 2020, 2:25pm UTC](https://forum.mautic.org/t/how-to-handle-bounces-with-own-mail-server/16438/4 "2020-10-05T14:25:51Z")

</div>

Those bounced yes flags are they somewhere visible at the contact itself?

Does it make a difference for the flag, if the email is a transactional or marketing email?

---

<div class="post-metadata">

**Author:** ![EJL](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/ejl/32/12155_2.png) [@EJL](https://forum.mautic.org/u/EJL)\
**Post date:** [October 5, 2020, 4:46pm UTC](https://forum.mautic.org/t/how-to-handle-bounces-with-own-mail-server/16438/5 "2020-10-05T16:46:47Z")

</div>

![Screenshot_2020-10-05 james pierce Mautic](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/2X/4/4163b72a9b3733678087ab5b5060106952cfad6c.png)  
Sorry for the poor example, but in the picture where it says “Do Not Contact” if an email has bounced that box will be yellow and say “Bounced” if everything is working properly

> [@frankofno](#):
>
> Does it make a difference for the flag, if the email is a transactional or marketing email?

Not that I am aware. In my experience the difference in transactional and marketing email designations is for the marketing messages only to be sent to a contact X number of times, as you designate in the settings, and triggered in campaigns.

---

<div class="post-metadata">

**Author:** ![frankofno](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/frankofno/32/3455_2.png) [@frankofno](https://forum.mautic.org/u/frankofno)\
**Post date:** [October 6, 2020, 5:32am UTC](https://forum.mautic.org/t/how-to-handle-bounces-with-own-mail-server/16438/6 "2020-10-06T05:32:23Z")

</div>

nice big avatar image. wish that one would should up on my site. anyway, let’s focus on the other issue, bounces. all i see “this event encountered an error …”

The bounce flag field itself is only visible in the db not in the backend?

Do I have to set an action in the campaign to handle bounces?

 ![Screenshot 2020-10-06 at 07.28.40](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/2X/5/5e24f87738599671f1b716a611da1ac6668fe240.png)

---

<div class="post-metadata">

**Author:** ![EJL](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/ejl/32/12155_2.png) [@EJL](https://forum.mautic.org/u/EJL)\
**Post date:** [October 6, 2020, 12:46pm UTC](https://forum.mautic.org/t/how-to-handle-bounces-with-own-mail-server/16438/7 "2020-10-06T12:46:17Z")

</div>

> [@frankofno](#):
>
> Do I have to set an action in the campaign to handle bounces?

Not that I’m aware. Having the mailbox and bounce address and crons running is the only steps as far as I know.  
Have you tried enabling the custom connection settings and testing connection to mailbox and the specific folder?

 ![image](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/2X/3/3f00b215b1178b7f3289da7957b3aec9dfbf28d7.jpeg)

I’ve had difficulty with bounce management to the point I’ve downloaded all the messages in my bounce enabled folder from server, extracting the emails to a csv and uploading in do not contact segment and adding a bounced tag. I run a simple campaign on that segment to set “Do Not Contact”

 ![image](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/2X/f/fd7864d352742e2619b88149343d22bdce1464c0.jpeg)

A rudimentary work around but works nonetheless till I have the time to troubleshoot further.
