6.0.0-alpha14
7/3/25

[#199] Missing folders with servers that don't uppercase 'INBOX'
Summary Missing folders with servers that don't uppercase 'INBOX'
Queue IMP
Queue Version HEAD
Type Bug
State Resolved
Priority 2. Medium
Owners slusarz (at) horde (dot) org
Requester imp (at) oak-wood (dot) co (dot) uk
Created 05/20/2004 (7714 days ago)
Due
Updated 02/27/2005 (7431 days ago)
Assigned 02/18/2005 (7440 days ago)
Resolved 02/27/2005 (7431 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch No

History
02/27/2005 06:49:54 AM Michael Slusarz Comment #18
State ⇒ Resolved
Reply to this comment
This should be fixed by my recent commits to IMAP_Tree.
02/18/2005 06:53:33 AM Michael Slusarz Comment #17
State ⇒ Feedback
Reply to this comment
Feedback?  I still can not reproduce this anymore.
02/08/2005 08:33:56 AM Jan Schneider Comment #16 Reply to this comment
Replace RELENG with FRAMEWORK_3 in Michael's comment. ;-)
02/08/2005 08:01:49 AM Michael Slusarz Comment #15 Reply to this comment
OK, if you are still seeing this:

Notice: Undefined index: a in 
/usr/local/www/mail/data/horde3/lib/Horde/IMAP/Tree.php on line 1115

then you need to make sure you are completely up-to-date with the 
latest version of the RELENG releases as this error was fixed several 
weeks ago.  If you are not up-to-date with RELENG, than my patch 
obviously isn't going to show any results.
02/07/2005 10:02:38 AM Jan Schneider State ⇒ Assigned
 
02/02/2005 08:45:52 AM imp (at) oak-wood (dot) co (dot) uk Comment #14 Reply to this comment
I still get this in sidebar.php:



Notice: Undefined index: a in 
/usr/local/www/mail/data/horde3/lib/Horde/IMAP/Tree.php on line 1115



Another more minor issue related to this is that in the mail block on 
the horde main page I have both 'Inbox' and 'INBOX' listed.
02/01/2005 11:53:41 PM Michael Slusarz Comment #13
Assigned to Michael Slusarz
Taken from Horde DevelopersHorde Developers
State ⇒ Feedback
Reply to this comment
Can you try what I just committed to framework/IMAP/IMAP/Tree.php?



diff for the 3.0.x branch:

http://cvs.horde.org/diff.php/framework/IMAP/IMAP/Tree.php?r1=1.53&r2=1.54&ty=u


02/01/2005 09:53:25 PM imp (at) oak-wood (dot) co (dot) uk Comment #12 Reply to this comment
it returns this, in sidebar.php



Array

(

     [Inbox] => stdClass Object

         (

             [name] => Inbox

             [attributes] => 32

             [delimiter] => /

             [fullServerPath] => {celandine.oak-wood.co.uk:143/imap/notls}Inbox

         )



     [chris] => stdClass Object

         (

             [name] => chris

             [attributes] => 32

             [delimiter] => /

             [fullServerPath] => {celandine.oak-wood.co.uk:143/imap/notls}chris

         )



     [accounts] => stdClass Object

         (

             [name] => accounts

             [attributes] => 64

             [delimiter] => /

             [fullServerPath] => 
{celandine.oak-wood.co.uk:143/imap/notls}accounts

         )



     [info] => stdClass Object

         (

             [name] => info

             [attributes] => 32

             [delimiter] => /

             [fullServerPath] => {celandine.oak-wood.co.uk:143/imap/notls}info

         )



     [webmaster] => stdClass Object

         (

             [name] => webmaster

             [attributes] => 32

             [delimiter] => /

             [fullServerPath] => 
{celandine.oak-wood.co.uk:143/imap/notls}webmaster

         )



     [c.hastie] => stdClass Object

         (

             [name] => c.hastie

             [attributes] => 32

             [delimiter] => /

             [fullServerPath] => 
{celandine.oak-wood.co.uk:143/imap/notls}c.hastie

         )



     [Stallions] => stdClass Object

         (

             [name] => Stallions

             [attributes] => 64

             [delimiter] => /

             [fullServerPath] => 
{celandine.oak-wood.co.uk:143/imap/notls}Stallions

         )



     [Tipi mail] => stdClass Object

         (

             [name] => Tipi mail

             [attributes] => 32

             [delimiter] => /

             [fullServerPath] => 
{celandine.oak-wood.co.uk:143/imap/notls}Tipi mail

         )



     [SilkThreads] => stdClass Object

         (

             [name] => SilkThreads

             [attributes] => 32

             [delimiter] => /

             [fullServerPath] => 
{celandine.oak-wood.co.uk:143/imap/notls}SilkThreads

         )



     [No spam] => stdClass Object

         (

             [name] => No spam

             [attributes] => 64

             [delimiter] => /

             [fullServerPath] => 
{celandine.oak-wood.co.uk:143/imap/notls}No spam

         )



     [tipichris@bigfoot.com] => stdClass Object

         (

             [name] => tipichris@bigfoot.com

             [attributes] => 64

             [delimiter] => /

             [fullServerPath] => 
{celandine.oak-wood.co.uk:143/imap/notls}tipichris@bigfoot.com

         )



     [Postmaster] => stdClass Object

         (

             [name] => Postmaster

             [attributes] => 32

             [delimiter] => /

             [fullServerPath] => 
{celandine.oak-wood.co.uk:143/imap/notls}Postmaster

         )



     [uktc-owner] => stdClass Object

         (

             [name] => uktc-owner

             [attributes] => 32

             [delimiter] => /

             [fullServerPath] => 
{celandine.oak-wood.co.uk:143/imap/notls}uktc-owner

         )



     [turtle@bigwig.net] => stdClass Object

         (

             [name] => turtle@bigwig.net

             [attributes] => 32

             [delimiter] => /

             [fullServerPath] => 
{celandine.oak-wood.co.uk:143/imap/notls}turtle@bigwig.net

         )



     [chris.hastie] => stdClass Object

         (

             [name] => chris.hastie

             [attributes] => 32

             [delimiter] => /

             [fullServerPath] => 
{celandine.oak-wood.co.uk:143/imap/notls}chris.hastie

         )



     [Filed] => stdClass Object

         (

             [name] => Filed

             [attributes] => 64

             [delimiter] => /

             [fullServerPath] => {celandine.oak-wood.co.uk:143/imap/notls}Filed

         )



     [Wastebasket] => stdClass Object

         (

             [name] => Wastebasket

             [attributes] => 64

             [delimiter] => /

             [fullServerPath] => 
{celandine.oak-wood.co.uk:143/imap/notls}Wastebasket

         )



     [Drafts] => stdClass Object

         (

             [name] => Drafts

             [attributes] => 64

             [delimiter] => /

             [fullServerPath] => 
{celandine.oak-wood.co.uk:143/imap/notls}Drafts

         )



     [Outbox] => stdClass Object

         (

             [name] => Outbox

             [attributes] => 64

             [delimiter] => /

             [fullServerPath] => 
{celandine.oak-wood.co.uk:143/imap/notls}Outbox

         )



     [News] => stdClass Object

         (

             [name] => News

             [attributes] => 32

             [delimiter] => /

             [fullServerPath] => {celandine.oak-wood.co.uk:143/imap/notls}News

         )



     [MailingLists] => stdClass Object

         (

             [name] => MailingLists

             [attributes] => 32

             [delimiter] => /

             [fullServerPath] => 
{celandine.oak-wood.co.uk:143/imap/notls}MailingLists

         )



     [Searches] => stdClass Object

         (

             [name] => Searches

             [attributes] => 32

             [delimiter] => /

             [fullServerPath] => 
{celandine.oak-wood.co.uk:143/imap/notls}Searches

         )



     [tangwen-sysadmin] => stdClass Object

         (

             [name] => tangwen-sysadmin

             [attributes] => 64

             [delimiter] => /

             [fullServerPath] => 
{celandine.oak-wood.co.uk:143/imap/notls}tangwen-sysadmin

         )



     [Trash] => stdClass Object

         (

             [name] => Trash

             [attributes] => 64

             [delimiter] => /

             [fullServerPath] => {celandine.oak-wood.co.uk:143/imap/notls}Trash

         )



     [Wedding] => stdClass Object

         (

             [name] => Wedding

             [attributes] => 32

             [delimiter] => /

             [fullServerPath] => 
{celandine.oak-wood.co.uk:143/imap/notls}Wedding

         )



     [Root] => stdClass Object

         (

             [name] => Root

             [attributes] => 32

             [delimiter] => /

             [fullServerPath] => {celandine.oak-wood.co.uk:143/imap/notls}Root

         )



     [Virus Alerts] => stdClass Object

         (

             [name] => Virus Alerts

             [attributes] => 64

             [delimiter] => /

             [fullServerPath] => 
{celandine.oak-wood.co.uk:143/imap/notls}Virus Alerts

         )



     [VirusSamples] => stdClass Object

         (

             [name] => VirusSamples

             [attributes] => 64

             [delimiter] => /

             [fullServerPath] => 
{celandine.oak-wood.co.uk:143/imap/notls}VirusSamples

         )



     [duff_stuff] => stdClass Object

         (

             [name] => duff_stuff

             [attributes] => 32

             [delimiter] => /

             [fullServerPath] => 
{celandine.oak-wood.co.uk:143/imap/notls}duff_stuff

         )



     [Spam] => stdClass Object

         (

             [name] => Spam

             [attributes] => 32

             [delimiter] => /

             [fullServerPath] => {celandine.oak-wood.co.uk:143/imap/notls}Spam

         )



     [Sent Items] => stdClass Object

         (

             [name] => Sent Items

             [attributes] => 64

             [delimiter] => /

             [fullServerPath] => 
{celandine.oak-wood.co.uk:143/imap/notls}Sent Items

         )



     [Warwickdc] => stdClass Object

         (

             [name] => Warwickdc

             [attributes] => 64

             [delimiter] => /

             [fullServerPath] => 
{celandine.oak-wood.co.uk:143/imap/notls}Warwickdc

         )



     [sent-mail] => stdClass Object

         (

             [name] => sent-mail

             [attributes] => 64

             [delimiter] => /

             [fullServerPath] => 
{celandine.oak-wood.co.uk:143/imap/notls}sent-mail

         )



     [trash] => stdClass Object

         (

             [name] => trash

             [attributes] => 64

             [delimiter] => /

             [fullServerPath] => {celandine.oak-wood.co.uk:143/imap/notls}trash

         )



     [Sent] => stdClass Object

         (

             [name] => Sent

             [attributes] => 64

             [delimiter] => /

             [fullServerPath] => {celandine.oak-wood.co.uk:143/imap/notls}Sent

         )



     [{4F17E540-8EB7-11d2-97A7-00A024A82FF3}] => stdClass Object

         (

             [name] => {4F17E540-8EB7-11d2-97A7-00A024A82FF3}

             [attributes] => 32

             [delimiter] => /

             [fullServerPath] => 
{celandine.oak-wood.co.uk:143/imap/notls}{4F17E540-8EB7-11d2-97A7-00A024A82FF3}

         )



     [INBOX] => stdClass Object

         (

             [name] => Inbox

             [attributes] => 32

             [delimiter] => /

             [fullServerPath] => {celandine.oak-wood.co.uk:143/imap/notls}Inbox

         )



)
02/01/2005 06:43:19 PM Michael Slusarz Comment #11 Reply to this comment
In imp/lib/IMAP/Tree.php, could you put the following:

print_r($boxes)

on line 147 and tell me what it returns?
01/21/2005 01:26:35 PM imp (at) oak-wood (dot) co (dot) uk Comment #10 Reply to this comment
Using 4.0.1 I now have all folders visible. However, connecting to the 
server with the mixed case Inbox I get this in the menu bar:



Notice: Undefined index: a in 
/usr/local/www/mail/data/horde3/lib/Horde/IMAP/Tree.php on line 1106



Don't know if it's related, or just a config option I've missed, but I 
don't see it on servers with INBOX.
01/18/2005 06:55:28 PM Chuck Hagenbuch Comment #9 Reply to this comment
Okay, now that we've released 4.0, is there anything to do on this?
12/11/2004 03:31:58 PM Jan Schneider State ⇒ Assigned
 
11/19/2004 04:41:33 PM Jan Schneider Comment #8 Reply to this comment
I agree that we shouldn't do this before 4.0. Did I mention that we 
need a milestone feature in Whups?
11/19/2004 04:28:08 PM Chuck Hagenbuch Comment #7 Reply to this comment
If there isn't a current problem I don't think we should do anything. 
I'm pretty sure, though, that c-client doesn't touch the case.
11/19/2004 04:24:43 PM Michael Slusarz Comment #6 Reply to this comment
At this stage in the release cycle, should we change all $foo == 
'INBOX' checks in IMP to instead use strcasecmp() instead?  Or does 
c-client automatically convert the INBOX mailbox name to all uppercase 
and, therefore, the reason we have not really run into any problems 
with this in the past?
11/15/2004 03:39:17 PM Jan Schneider Comment #5
State ⇒ Feedback
Reply to this comment
Is this still happening?
07/13/2004 12:54:36 PM Jan Schneider Assigned to Horde DevelopersHorde Developers
Priority ⇒ 2. Medium
State ⇒ Assigned
Taken from Michael Slusarz
 
05/20/2004 10:37:36 PM Jan Schneider Taken from Jan Schneider
Assigned to Michael Slusarz
Priority ⇒ 2. Medium
State ⇒ Assigned
 
05/20/2004 06:06:32 PM imp (at) oak-wood (dot) co (dot) uk Comment #4 Reply to this comment
That patch to IMAP_Sort::_mbox_cmp() does sort out the tree display, 
on the face of it. But I'm not convinced it will be consistent, and it 
throws up other problems.



An additional 'INBOX' element is still be inserted. Providing the sort 
results in 'INBOX' appearing before 'Inbox' I will see only 'Inbox' in 
the tree, which is the way I need it as only 'Inbox' contains 
sub-folders. But if the sort reverses the order of Inbox and INBOX 
I'll see both in the tree.



The drop down list of folders and the check boxes on the search page 
now include both INBOX and Inbox, both at the top of the list, and 
NEITHER has any sub-folders showing. These appear to have been moved 
to another folder, the neighbour of 'Inbox' had the sorting been 
strictly alphabetical.



The fundamental problem seems to be that various libraries assume that 
'INBOX' will always be upper case, and that if no folder with the 
upper case name 'INBOX' exists, one is added to the tree.
05/20/2004 09:26:12 AM Jan Schneider Comment #3 Reply to this comment
If this RFC really says that INBOX must be case insensitive (I didn't 
have time to look it up right now), we shouldn't convert it to any 
casing, but ignore the case when sorting the tree instead.



Try the attached patch and see if it fixes the sorting for you.
05/20/2004 09:26:11 AM Jan Schneider Comment #2
Priority ⇒ 2. Medium
New Attachment: imap-sort.diff Download
Reply to this comment
If this RFC really says that INBOX must be case insensitive (I didn't 
have time to look it up right now), we shouldn't convert it to any 
casing, but ignore the case when sorting the tree instead.



Try the attached patch and see if it fixes the sorting for you.
05/20/2004 09:23:08 AM Jan Schneider State ⇒ Assigned
Priority ⇒ 3. High
Assigned to Jan Schneider
 
05/20/2004 08:11:48 AM imp (at) oak-wood (dot) co (dot) uk Comment #1
Priority ⇒ 3. High
Type ⇒ Bug
Queue ⇒ IMP
State ⇒ Unconfirmed
Reply to this comment
The view of folders in folders.php on servers returning 'Inbox' does 
not include any that are alphabetically before 'Inbox'.



IMP_Tree::_init() creates an INBOX if none exists. However, the name 
of this will be set to 'Inbox'. Consequently, the value of 
IMP_Tree->_first is set to 'Inbox' so that when IMP_Tree::reset() is 
called it moves to 'Inbox', not 'INBOX'.



Since RFC3501 is specific about INBOX being case insensitive, IMP_Tree 
and IMAP_Tree need to handle the used of mixed case in this folder name.



This kludge for IMP_Tree gets all the folders showing:



--- Tree.php.orig       Fri May 14 21:03:07 2004

+++ Tree.php    Fri May 14 22:54:49 2004

@@ -72,6 +72,7 @@



          if (!isset($boxes['INBOX'])) {

              $boxes['INBOX'] = $this->_getMailbox('INBOX');

+            $boxes['INBOX']->name = 'INBOX';

          }



          /* Do a sort to make sure that 'INBOX' always appears as the first



However, this shows both an INBOX at the top of the tree and an Inbox 
arranged alphabetically. Although both contain the same messages, only 
Inbox contains sub-folders.



I did try to patch IMAP_Tree::_getList with this to canonicise to upper case:



--- Tree.php.orig       Sun May 16 19:18:41 2004

+++ Tree.php    Thu May 20 09:07:00 2004

@@ -341,6 +341,9 @@



                      /* Strip off server string. */

                      $box = $this->_removeServerString($box);

+                    if (strtoupper($box->name) == 'INBOX' ) {

+                      $box->name = 'INBOX';

+                    }

                      $unique[$box->name] = $box;

                  }

              }



but this resulted in none of the folders beneath INBOX in the 
hierarchy showing.

Saved Queries