Mautic not recognizing / seeing replies in a campaign

Your software
My Mautic version is: 4.1.1
My PHP version is: 7.4
My Database type and version is: MySQL 5.7

Your problem
My problem is: When I have a campaign send an email and a reply comes back Mautic doesnt see / process it.

  1. Campaign sends email to test email account.
  2. I receive the email in the test and reply.
  3. The reply lands in the proper mailbox, but remains untouched despite the cron task executing.

These errors are showing in the log:

There are no particular errors but what I get as output from the mautic:email:fetch process:

/opt/plesk/php/7.4/bin/php bin/console -vvv mautic:email:fetch
0 emails processed for {mediagiantdigital.com:993/imap/ssl/novalidate-cert}INBOX with a criteria of UNSEEN
0 emails processed for {mediagiantdigital.com:993/imap/ssl/novalidate-cert}INBOX with a criteria of UID 17995:1000017995

Steps I have tried to fix the problem:

  1. I tried consolidating the email accounts first. I originally had the from address, a bounces address and a reply to address. I got rid of the reply to and made it the same as the from. (Bounces have always processed fine).

  2. Ive made all kinds of changes and adjustments to the email configuration to see if I could influence the outcome that way - but nada.

Thanks in advance for any help.

Knock knock - trying to bump this for some help.

So I’ve taken it upon myself to test and attempt to debug the issue I am facing. It seems that for some reason - my reply address is trying to pull back new messages with the search criteria of UID 17995:1000017995.

This seems to be incorrect (Im honestly not sure how it got set to that) which I think is the bug in and of itself.

When I modified line 63 of the MailboxOrganizer in the Email Bundle, it all came to life.

Basically I changed things so that it would always return the search criteria of UNSEEN (which works perfectly). See below.

   $criteria   = /*isset($criteriaRequested[$name]) ? $criteriaRequested[$name] :*/ Mailbox::CRITERIA_UNSEEN;

What I dont understand is what sets the override criteria so that instead of UNSEEN I had the UID criteria. And is that UID criteria necessary if a reply / bounce checker is always going to look for new messages.

Any clarification is appreciated.