# Mautic bounce emails - Delivered to IMAP bounce folder but with empty Return-Path header

**URL:** <https://forum.mautic.org/t/mautic-bounce-emails-delivered-to-imap-bounce-folder-but-with-empty-return-path-header/21687>\
**Category:** Product Support\
**Created:** [November 19, 2021, 2:29pm UTC](https://forum.mautic.org/t/mautic-bounce-emails-delivered-to-imap-bounce-folder-but-with-empty-return-path-header/21687 "2021-11-19T14:29:06Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![deanw](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/deanw/32/677_2.png) [@deanw](https://forum.mautic.org/u/deanw)\
**Post date:** [November 19, 2021, 2:29pm UTC](https://forum.mautic.org/t/mautic-bounce-emails-delivered-to-imap-bounce-folder-but-with-empty-return-path-header/21687/1 "2021-11-19T14:29:06Z")

</div>

**Your software**  
My Mautic version is: 4.1  
My PHP version is: 7.4.3  
My Database type and version is: 10.3.31-MariaDB

**Your problem**  
My problem is: Bounce messages using reply-to format are delivered to the configured bounce IMAP folder. e.g. Return-Path: [bounce+bounce\_619322718d3e9251078198@domain](mailto:bounce+bounce_619322718d3e9251078198@domain)

Once the bounce message is delivered to the IMAP inbox what header is read to update contacts? Is it the Return-Path header? If so i my case the Return-Path is being stripped either by the Postfix MTA or IMAP Smartermail server as on delivery the header is empty e.g. Return-Path: \<\>

Has anyone seen this before and know where to look next?

---

<div class="post-metadata">

**Author:** ![fkrafft](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/fkrafft/32/2220_2.png) [@fkrafft](https://forum.mautic.org/u/fkrafft)\
**Post date:** [November 19, 2021, 4:02pm UTC](https://forum.mautic.org/t/mautic-bounce-emails-delivered-to-imap-bounce-folder-but-with-empty-return-path-header/21687/2 "2021-11-19T16:02:32Z")

</div>

Dean,  
I’m not sure what part of the header is read by Mautic, but my bounced emails were not read either.

This is how I solved it:

1. In my iReadMail installation I have an email account accessible from RoundCube.
2. Create a subfolder to Inbox, i called it bounces
3. Create a filter to collect all the incoming bounces emails in the subfolder called bounces
4. Go to mautic / configuration/email, configure mautic imap to check the email account from iRedMail, set mautic bounced to check the bounced subfolder.

---

<div class="post-metadata">

**Author:** ![deanw](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/deanw/32/677_2.png) [@deanw](https://forum.mautic.org/u/deanw)\
**Post date:** [November 20, 2021, 2:28am UTC](https://forum.mautic.org/t/mautic-bounce-emails-delivered-to-imap-bounce-folder-but-with-empty-return-path-header/21687/3 "2021-11-20T02:28:36Z")

</div>

Yes that’s how mine is also setup using Mautic’s monitoring of the IMAP bounce folder with cron to fetch the bounce messages. It seems the Return-Path is used to set the To: address for the bounce email message and is removed by the recipents mail server.

“Only the recipient’s mail server is supposed to add a Return-Path header to the top of the email. This records the actual Return-Path sender during the SMTP session. If a Return-Path header already exists in the message, then that header is removed and replaced by the recipient’s mail server.”

1. The return-path header is set by Mautic server as “[youremail+bounce\_receiver-email-id@your-domain.com](mailto:youremail+bounce_receiver-email-id@your-domain.com)”
2. Email bounced message is sent back using the Return-Path header address. The receiver SMTP sets a new Return-Path or in this case removes it.
3. Mautic then uses ??? header to set the contact as bounced “do not contact”. Is Mautic using the To: header which was set using the Return-Path address?

Return-Path: \<\>  
Received: from app.domain (app.domain [XX.XX.XX.XX]) by mail.otherdomain with SMTP  
(version=TLS\Tls12  
cipher=Aes256 bits=256);  
Fri, 19 Nov 2021 17:32:10 +0800  
Date: Fri, 19 Nov 2021 17:31:36 +0800 (HKT)  
From: MAILER-DAEMON@domain (Mail Delivery System)  
Subject: Undelivered Mail Returned to Sender  
To: bounce+bounce\_61976e9a4d2b4763769789@domain

---

<div class="post-metadata">

**Author:** ![deanw](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/deanw/32/677_2.png) [@deanw](https://forum.mautic.org/u/deanw)\
**Post date:** [November 22, 2021, 1:19am UTC](https://forum.mautic.org/t/mautic-bounce-emails-delivered-to-imap-bounce-folder-but-with-empty-return-path-header/21687/4 "2021-11-22T01:19:52Z")

</div>

Anyone know which header Mautic uses to detemine bounced contacts using IMAP method? That is the when Mautic cron fetch reads the IMAP folder configured under Settings \> Configuration \> Email Settings \> Monitored Inbox Settings \> Bounces

The bounce managment page does not make this clear. [Bounce management | Mautic](https://docs.mautic.org/en/channels/emails/bounce-management)

Note that Mautic makes use of “append” email addresses. The return-path or the list-unsubscribe header will use something like `youremail+bounce_abc123@your-domain.com` . The `bounce` or `unsubscribe` allows Mautic to determine what type of email it is when it examines the inbox through IMAP.

---

<div class="post-metadata">

**Author:** ![deanw](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/deanw/32/677_2.png) [@deanw](https://forum.mautic.org/u/deanw)\
**Post date:** [November 23, 2021, 2:33am UTC](https://forum.mautic.org/t/mautic-bounce-emails-delivered-to-imap-bounce-folder-but-with-empty-return-path-header/21687/5 "2021-11-23T02:33:58Z")

</div>

Ok solved by restarting Mautic and Postfix server. I think Postfix had not reloaded it’s main config file.

The header To: is being read by Mautic now to process boucnes and contacts tagged and added by filter to the bounced segment.
