#1780 Parent folders getting lost

open
Folders (317)
5
2005-06-07
2005-05-26
Anonymous
No

If a folder is listed by Cyrus IMAP nested inside another folder, but
the parent folder is not explicitly listed itself, SM will not display the
parent folder, but will instead just display the child folder indented.
This makes it so one cannot tell where the folder really is located, or
collapse the parent, etc.

For instance, if the following folder is listed:

Shared Folders/testfolder

But the following is not defined explicitly:

Shared Folders

then only testfolder will appear in the folder list, mysteriously
indented.

Ordinarily this is solvable by simply creating the parent explicitly in
Cyrus, and everything works. However, this is not possible using
Cyrus's Shared Folders functionality, where the parent is never
explicitly listed.

Other mail clients, such as OSX Mail, properly render the parent
folder in this situation, so SM should probably as well.

Discussion

  • Jonathan Angliss

    • assigned_to: nobody --> jangliss
     
  • Jonathan Angliss

    Logged In: YES
    user_id=620333

    Shall review again after 1.4.5 is released as I believe the
    code change required might be a little extensive this late
    in the game.

     
  • Nobody/Anonymous

    Logged In: NO

    I (jgsmith at tamu.edu) added the following to functions/
    imap_mailbox.php to fix this (in SM 1.4.5):

    red# diff -c imap_mailbox.php.dist imap_mailbox.php
    *** imap_mailbox.php.dist Thu Aug 25 14:13:58 2005
    --- imap_mailbox.php Thu Aug 25 14:14:09 2005
    ***************
    *** 579,584 ****
    --- 579,589 ----
    }
    $temp_mailbox_name = find_mailbox_name($lsub_ary[$i]);
    $sorted_lsub_ary[] = $temp_mailbox_name;
    + $t = $temp_mailbox_name;
    + while(ereg("/", $t)) {
    + $t = ereg_replace("/[^/]+$", "", $t);
    + $sorted_lsub_ary[] = $t;
    + }
    if (!$inbox_subscribed && strtoupper($temp_mailbox_name)
    == 'INBOX') { $inbox_subscribed = true; }

     
  • Nobody/Anonymous

    Logged In: NO

    my apologies... the diff was against 1.4.4

    For 1.4.5, change the line numbers:

    *** imap_mailbox.php.1.4.5 Fri Aug 26 14:11:07 2005
    --- imap_mailbox.php Fri Aug 26 14:13:34 2005
    ***************
    *** 552,557 ****
    --- 552,562 ----

     
  • Thijs Kinkhorst

    Thijs Kinkhorst - 2006-07-06

    Logged In: YES
    user_id=285765

    Jon, can you check this patch out?

     
  • Thijs Kinkhorst

    Thijs Kinkhorst - 2006-08-14

    Logged In: YES
    user_id=285765

    I don't have cyrus... can someone with cyrus please check
    the status of this?

     
  • Remy Blank

    Remy Blank - 2007-05-19

    Logged In: YES
    user_id=568100
    Originator: NO

    I have the same problem with a dovecot IMAP server, using squirrelmail-1.4.9a.

    The patch doesn't work, because the path separator is "." for dovecot, as opposed
    to "/" for cyrus.

    But the following patch should work with all IMAP servers (it does with dovecot).

    --- functions/imap_mailbox.php.orig 2006-12-17 14:08:01.000000000 +0100
    +++ functions/imap_mailbox.php 2007-05-19 18:01:00.000000000 +0200
    @@ -604,6 +604,16 @@
    if (!$inbox_subscribed && strtoupper($temp_mailbox_name) == 'INBOX') {
    $inbox_subscribed = true;
    }
    +
    + /* Add parent folders as well */
    + for ($j=0; $j < strlen($temp_mailbox_name); $j++) {
    + if ($temp_mailbox_name{$j} == $delimiter) {
    + $parent = substr($temp_mailbox_name, 0, $j);
    + if (strtoupper($parent) != 'INBOX') {
    + $sorted_lsub_ary[] = $parent;
    + }
    + }
    + }
    }
    /* remove duplicates */
    $sorted_lsub_ary = array_unique($sorted_lsub_ary);

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks