6.0.0-beta1
7/5/25

[#9273] IMAP Error when only INBOX exists
Summary IMAP Error when only INBOX exists
Queue IMP
Queue Version 4.3.8
Type Bug
State Resolved
Priority 3. High
Owners slusarz (at) horde (dot) org
Requester stephens (at) ameslab (dot) gov
Created 09/29/2010 (5393 days ago)
Due
Updated 10/21/2010 (5371 days ago)
Assigned 09/29/2010 (5393 days ago)
Resolved 09/29/2010 (5393 days ago)
Github Issue Link
Github Pull Request
Milestone 4.3.9
Patch No

History
10/21/2010 09:29:38 AM dennis (at) cabal4u (dot) de Comment #8 Reply to this comment

[Show Quoted Text - 48 lines]
This fix wont work. Users who have no additional folders are no able 
to log in. But existing folders wont be shown anymore.

I have the same problem with the current horde groupware edition. One 
of my users is complaining about this problem and I tried this patch. 
Now the user is able to log in. But if I log in to my account, I can 
only see my inbox, no additional folders. If I remove the patch, all 
folders are shown again.

10/13/2010 12:58:20 PM chris (at) cb-solutions (dot) de Comment #7 Reply to this comment
Yes, its definitely a showstopper and it took me some hours today with 
a fresh Installation of horde webmail on a freshly set up mailserver 
until I found this bug report. First test-account worked (had more 
than .INBOX), second one didn't. That confused me a bit. Would you 
mind to release the patch ASAP, please? What about calling it 4.3.8.1 
if 4.3.9 isn't ready for release yet? Honestly thank you for your 
great work!! :)
09/30/2010 06:07:23 PM Michael Slusarz Comment #6
Priority ⇒ 3. High
Milestone ⇒ 4.3.9
Reply to this comment
Unfortunately, this is a showstopper and I will need to release 4.3.9 
soon.  Stupid undefined array.
09/29/2010 09:49:37 PM Michael Slusarz State ⇒ Resolved
 
09/29/2010 09:49:31 PM CVS Commit Comment #5 Reply to this comment
09/29/2010 07:59:36 PM stephens (at) ameslab (dot) gov Comment #4 Reply to this comment
Removed our hack and implemented diff patch at 
http://git.horde.org/diff.php/imp/lib/IMAP/Tree.php?rt=horde&r1=1.25.2.72&r2=1.25.2.73 which declares/initializes $names as an array prior to referencing it.  This addresses the issue we were 
seeing.

Thanks.


09/29/2010 06:40:31 PM Michael Slusarz Comment #3
State ⇒ Feedback
Assigned to Michael Slusarz
Reply to this comment
Can you try this patch instead?  Your patch isn't correct because it 
assumes that if INBOX doesn't exist, no other mailboxes exist.  It is 
entirely possible that an IMAP server returns a bunch of folder names 
*except* INBOX (this is the exact reason for the change between 4.3.7 
and 4.3.8).  The use of the addition operator ensures that the Inbox 
always appears first in the list.
09/29/2010 06:35:44 PM CVS Commit Comment #2 Reply to this comment
Changes have been made in CVS for this ticket:

Bug: 9273
$names might not be an array here.
http://cvs.horde.org/diff.php/imp/lib/IMAP/Tree.php?rt=horder1=1.25.2.72r2=1.25.2.73ty=u
09/29/2010 06:01:52 PM stephens (at) ameslab (dot) gov Comment #1
Priority ⇒ 1. Low
Type ⇒ Bug
Summary ⇒ IMAP Error when only INBOX exists
Queue ⇒ IMP
Milestone ⇒
Patch ⇒ No
State ⇒ Unconfirmed
Reply to this comment
Some of our users complained about receiving this error right after we 
upgraded to IMP 4.3.8:

Fatal error: Unsupported operand types in 
/home/web/appversions/horde-3.3.9/imp-h3-4.3.8/lib/IMAP/Tree.php on 
line 333

We isolated the complaining users as those with only INBOX mailbox and 
no other IMAP mailboxes in their Maildir store on the server.

When we patch lib/IMAP/Tree.php as follows, the error does not occur 
and these users are able to use IMP.  However, this patch has not been 
thoroughly tested.

--- Tree.php.1  2010-09-11 11:59:11.000000000 -0500
+++ Tree.php    2010-09-29 11:38:25.000000000 -0500
@@ -330,7 +330,8 @@

          if (!isset($names['INBOX'])) {
              /* INBOX must always appear. */
-            $names = array('INBOX' => 1) + $names;
+            /*$names = array('INBOX' => 1) + $names;*/
+            $names = array('INBOX' => 1);
          }

          if ($showunsub) {

From diff'ing lib/IMAP/Tree.php, it appears this bug was introduced 
during the change from IMP 4.3.7 to 4.3.8.

We use Courier IMAP 4.1.3 as our POP/IMAP server.

We are running IMP with Horde RHEL5.x using PHP 5.2.x, and our IMP 
config/servers.php is configured as follows:

$servers['imap'] = array(
     'name' => 'Imap server',
     'server' => 'imap-server-hostname.XXXX.YYY',
     'hordeauth' => false,
     'protocol' => 'imap/ssl/novalidate-cert',
     'port' => 993,
     'maildomain' => 'XXXX.YYY',
     'smtphost' => 'smtp-server-hostname.XXXX.YYY',
     'smtpport' => 25,
     'realm' => '',
     'preferred' => '',
);

Saved Queries