6.0.0-git
2021-01-19

[#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 2004-05-20 (6088 days ago)
Due
Updated 2005-02-27 (5805 days ago)
Assigned 2005-02-18 (5814 days ago)
Resolved 2005-02-27 (5805 days ago)
Milestone
Patch No

History
2005-02-27 06:49:54 Michael Slusarz Comment #18
State ⇒ Resolved
Reply to this comment
This should be fixed by my recent commits to IMAP_Tree.
2005-02-18 06:53:33 Michael Slusarz Comment #17
State ⇒ Feedback
Reply to this comment
Feedback?  I still can not reproduce this anymore.
2005-02-08 08:33:56 Jan Schneider Comment #16 Reply to this comment
Replace RELENG with FRAMEWORK_3 in Michael's comment. ;-)
2005-02-08 08:01:49 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.
2005-02-07 10:02:38 Jan Schneider State ⇒ Assigned
 
2005-02-02 08:45:52 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.
2005-02-01 23:53:41 Michael Slusarz Comment #13
Assigned to Michael Slusarz
State ⇒ Feedback
Taken from Horde DevelopersHorde Developers
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


2005-02-01 21:53:25 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

         )



)
2005-02-01 18:43:19 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?
2005-01-21 13:26:35 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.
2005-01-18 18:55:28 Chuck Hagenbuch Comment #9 Reply to this comment
Okay, now that we've released 4.0, is there anything to do on this?
2004-12-11 15:31:58 Jan Schneider State ⇒ Assigned
 
2004-11-19 16:41:33 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?
2004-11-19 16:28:08 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.
2004-11-19 16:24:43 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?
2004-11-15 15:39:17 Jan Schneider Comment #5
State ⇒ Feedback
Reply to this comment
Is this still happening?
2004-07-13 12:54:36 Jan Schneider State ⇒ Assigned
Priority ⇒ 2. Medium
Taken from Michael Slusarz
Assigned to Horde DevelopersHorde Developers
 
2004-05-20 22:37:36 Jan Schneider State ⇒ Assigned
Priority ⇒ 2. Medium
Assigned to Michael Slusarz
Taken from Jan Schneider
 
2004-05-20 18:06:32 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.
2004-05-20 09:26:12 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.
2004-05-20 09:26:11 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.
2004-05-20 09:23:08 Jan Schneider State ⇒ Assigned
Priority ⇒ 3. High
Assigned to Jan Schneider
 
2004-05-20 08:11:48 imp (at) oak-wood (dot) co (dot) uk Comment #1
Type ⇒ Bug
State ⇒ Unconfirmed
Priority ⇒ 3. High
Queue ⇒ IMP
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