SuiteCRM 8.5 IMAP Errors - Campaigns and Inbound mailboxes

Hi all,

SuiteCRM8.5
MariaDB 10.5.22
MySQL 8.1.26
PHP 8.1.26

This is a problem we have had for some time, including previous V8 releases I think.

Basically, we have an inbound email address configured and an inbound bounce email address configured.

Both appear to be configured correctly and if you send email to them from an external mailbox, they are received and display correctly using the SuiteCRM email client within Suite.

However, accessing them and also similarly via campaigns generates Fatal errors that I cannot fathom.

The IMAP module in PHP is enabled as are all of the other PHP modules I believe are required.

I have been through the code within IMAPhandler.php and IMAP handlerException.php etc… in the /legacy/include directory and can clearly see where the error messages are being generated, as per the logfile extract below, but can’t for the life of me track how they are being caused, given that the accounts are correct, as far as I can see.

Wed Jan 24 06:03:30 2024 [18525][1][FATAL] ImapHandler trying to use a non valid resource stream.
Wed Jan 24 06:03:30 2024 [18525][1][FATAL] ImapHandler trying to use a non valid resource stream.
Wed Jan 24 06:03:30 2024 [18525][1][FATAL] An Imap error detected: “IMAP search error”
Wed Jan 24 06:03:30 2024 [18525][1][FATAL] An Imap error detected: “IMAP search error”
Wed Jan 24 06:03:30 2024 [18525][1][FATAL] An Imap error detected: “IMAP expunge error”
Wed Jan 24 06:05:27 2024 [32541][1][FATAL] ImapHandler trying to use a non valid resource stream.
Wed Jan 24 06:05:27 2024 [32541][1][FATAL] ImapHandler trying to use a non valid resource stream.
Wed Jan 24 06:06:02 2024 [2391][1][FATAL] ImapHandler trying to use a non valid resource stream.
Wed Jan 24 06:06:02 2024 [2391][1][FATAL] ImapHandler trying to use a non valid resource stream.
Wed Jan 24 06:06:39 2024 [4882][1][FATAL] ImapHandler trying to use a non valid resource stream.
Wed Jan 24 06:06:39 2024 [4882][1][FATAL] ImapHandler trying to use a non valid resource stream.
Wed Jan 24 06:07:19 2024 [7191][1][FATAL] ImapHandler trying to use a non valid resource stream.
Wed Jan 24 06:07:19 2024 [7191][1][FATAL] ImapHandler trying to use a non valid resource stream.
Wed Jan 24 06:07:19 2024 [7191][1][FATAL] An Imap error detected: “IMAP mailMove error”
Wed Jan 24 06:07:19 2024 [7191][1][FATAL] INBOUNDEMAIL: MoveEmail to INBOX.Trash FAILED - trying hard delete for message: 5,4
Wed Jan 24 06:07:19 2024 [7191][1][FATAL] An Imap error detected: “IMAP expunge error”
Wed Jan 24 06:07:19 2024 [7203][1][FATAL] ImapHandler trying to use a non valid resource stream.
Wed Jan 24 06:07:19 2024 [7203][1][FATAL] ImapHandler trying to use a non valid resource stream.
Wed Jan 24 06:07:30 2024 [7666][1][FATAL] ImapHandler trying to use a non valid resource stream.
Wed Jan 24 06:07:30 2024 [7666][1][FATAL] ImapHandler trying to use a non valid resource stream.
Wed Jan 24 06:07:33 2024 [7743][1][FATAL] ImapHandler trying to use a non valid resource stream.
Wed Jan 24 06:07:33 2024 [7743][1][FATAL] ImapHandler trying to use a non valid resource stream.
Wed Jan 24 06:26:47 2024 [27608][1][FATAL] ImapHandler trying to use a non valid resource stream.
Wed Jan 24 06:26:47 2024 [27608][1][FATAL] ImapHandler trying to use a non valid resource stream.
Wed Jan 24 06:26:54 2024 [27748][1][FATAL] ImapHandler trying to use a non valid resource stream.
Wed Jan 24 06:26:54 2024 [27748][1][FATAL] ImapHandler trying to use a non valid resource stream.
Wed Jan 24 06:27:32 2024 [29207][1][FATAL] ImapHandler trying to use a non valid resource stream.
Wed Jan 24 06:27:32 2024 [29207][1][FATAL] ImapHandler trying to use a non valid resource stream.

The Inbound accounts are contained within a hosted service but work correctly and also forward to our corporate outlook so i know that these are all fine., as it would seem with SuiteCRM as well.

Any help gratefully recieved as I think I have been looking at the code for too long and am probably missing something silly.

I have searched the forum for similar issues but there is nothing really the sam as this. I will also look at GitHub now as well.

Thanks in advance.

Hi,

Have you found the solution?

In short no. What I did do is update the code as per another post, which fixed the bounceback issue completely. This seemed to sort my issues but we still see a few IMAP errors but they seem to cause no problem.

The main problem was that SuiteCRM couldn’t process bouncebacks due to not being able to recognise the content in the bouceback email correctly.

I will sort out the link to the solution and post but if you look at my other posts, you can also find it that way.

The main problem was that SuiteCRM couldn’t process bouncebacks due to not being able to recognise the content in the bouceback email correctly.

This code fix sounds like a great one to add to github as a new pull request (PR).

Here is the linkto the fix that sorted out the Bouncebacks and removed most of the IMAP errors. I hop this helps. The full topic is a bit longer, so you can go to it from here if you want to follow the whole thing.

I am loathe to add to Github as a PR, as I think it has already been done but has not yet found its way into the release code.

1 Like