Freescout: Error fetching emails: "Invalid mailbox list"

Created on 15 Dec 2018  Â·  9Comments  Â·  Source: freescout-helpdesk/freescout

Running version 1.1.2, today everything seemed to be working fine but all of a sudden FreeScout can no longer fetch emails, and outputs this error when it tries:

[2018-12-14 20:40:04] Mailbox: <Mailbox name>
[2018-12-14 20:40:04] Folder: INBOX
[2018-12-14 20:40:04] Error: Invalid mailbox list: <>; File: /var/www/freescout.git/app/Console/Commands/FetchEmails.php (150)
[2018-12-14 20:40:04] Fetching finished

It seems to have been caused by a failed delivery email in the Inbox, likely because either the Return-path or To header was set to <> (my guess). Here are the headers of that email:

Return-Path: <>
Delivered-To: [email protected]
Received: from mail.website.com ([127.0.0.1])
  by mail.website.com with LMTP id GDr1DfKAFFx5JAAAXRy+/A
  for <[email protected]>; Fri, 14 Dec 2018 20:20:02 -0800
Received: (Haraka 30047 invoked for bounce); Fri, 14 Dec 2018 20:20:02 -0800
Date: Fri, 14 Dec 2018 20:20:02 -0800
From: [email protected]
To: <>
Subject: failure notice
Message-Id: <[email protected]>
Content-Type: multipart/report; report-type=delivery-status;
    boundary="boundary_3D69C48A-D84E-4182-B200-681FC991DEC5"
References: <[email protected]>
DKIM-Signature: v=1;a=rsa-sha256;bh=GW35JtOWUDUuTCUQWpUc3MU3aqrouc42wzNIIWGVl3s=;c=relaxed/simple;d=turtlemailbox.com;h=from:subject:date:message-id:to;s=s20181123173;b=q6nUGzOrQIDILD3xyCWxP3ZdniUnvEX9BINZQ6sP6gdftkloYLeyLjy6Aq7yO+M2ngIigNP5P7snHTDCAePiGYrRXA2kbhkXvuI88z1j6JIhOBqKrcifWELeB5ppRusVtR0dvg5AkdrCiM8PNqYdLdFu81PfK2wx1E6nXOJMPIabEcAwbeNgvH/psrAcxne58eYAMCzvhBex9hSHm6xVIDSxO7qQSOvlXgNpmQRGqToNnxRA5Niwoh7UpCXy0UeH2Mmqz3JZHSQ+UG4ai9VpsB9MlbMgrpyS+GMK2utPAoeuqgVCfLmQpWcWXPkyEMqNjvNLk93xO5rGlN0SMgUutA==

This is a MIME-encapsulated message.

[ ... rest of email continues ... ]

I managed to fix the problem by moving this email out of the INBOX and then clicking the "Clear Cache" button in the FreeScout system tools.

Most helpful comment

All 9 comments

Similar issue https://github.com/glpi-project/glpi/issues/337
They concluded that it was IMAP problem of the mail server.

I do not understand French, however I do not think this has anything to do with IMAP. Accessing the IMAP server works just fine. Also, I do not see the same error they're getting in any php logs. I do not see this error either.

The problem started when this email appeared in the INBOX, and disappeared when I moved it out of the INBOX and cleared the cache. So I'm 99.9999999% certain the problem is with the email headers and not with IMAP.

Error message you got Invalid mailbox list is not present in the app or in the IMAP library https://github.com/Webklex/laravel-imap, which means it has been returned by your IMAP server. Apparently IMAP got broken because of this email and got fixed after you removed the email.

Hmm. That is odd. So it sounds like it's not a problem with FreeScout then but either with the server or with php-imap module. I will close this issue for now then. Thanks for your help.

I verified that every mail containing an empty Mail-Header, ie:

From: <>
Reply-To: <>

breaks FreeScout.

@psuet what error message are you getting in logs?

Same as above

Error: Invalid mailbox list: <>; File: /var/www/ticket/app/Console/Commands/FetchEmails.php (155)

I only wanted to document somewhere that not only To or Return-Path shows this behaviour. (still perfectly valid mails)

Dear @freescout-helpdesk — https://youtu.be/wmzyYquMS2I?t=59

Was this page helpful?
0 / 5 - 0 ratings