Re: Correct naming scheme for dovecot/squirrelmail subfolders?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>> If you use Fedora/RHEL/Centos SquirrelMail rpm, it overrides some
>> configuration variables in /etc/squirrelmail/config_local.php.
>
> The only command in that file on my server is:
>
>       $default_folder_prefix          = '';
> so it should not do anything bad, should it?
>
>> Enable info plugin and execute NAMESPACE command in Options-> IMAP
>> server
>> information or use telnet connection to test your imap server. Show test
>> results. Also show results of LSUB test.
>
> Here they are (is typing just "NAMESPACE" as IMAP command string,
> without options, correct?):
>
> TEST_7
> Request:
> A005 LSUB "" "*%"
> Response:
> * LSUB () "." "Sent"
> * LSUB () "." "Trash"
> * LSUB () "." "Drafts"
> * LSUB () "." "INBOX.test_1"
> * LSUB () "." "INBOX.test_2"
> Lsub completed.
>
> TEST_9
> Request:
> A006 NAMESPACE
> Response:
> * NAMESPACE (("" ".")) NIL NIL
> Namespace completed.
>
> What do you think?

In correct listing INBOX.test_1 and INBOX.test_2 should be listed between
INBOX and Drafts. In SquirrelMail 1.4.9a they are listed after Trash. See
1353394 bug tracker.

Patch attached. It can be applied in SquirrelMail functions directory with
'patch -p 0 < imap_mailbox.php.diff' command. Patch is experimental and it
breaks courier preset. All modifications are in sqimap_mailbox_list()
function.

-- 
Tomas
--- imap_mailbox.php.orig	2006-10-07 15:58:41.000000000 +0300
+++ imap_mailbox.php	2006-12-29 21:20:17.000000000 +0200
@@ -570,7 +570,7 @@
         global $data_dir, $username, $list_special_folders_first,
                $folder_prefix, $trash_folder, $sent_folder, $draft_folder,
                $move_to_trash, $move_to_sent, $save_as_draft,
-               $delimiter, $noselect_fix_enable;
+               $delimiter, $noselect_fix_enable, $default_sub_of_inbox;
         $inbox_in_list = false;
         $inbox_subscribed = false;
 
@@ -682,6 +682,17 @@
             }
         }
 
+        if (! $default_sub_of_inbox) {
+        /* Find INBOX's children */
+        for($k = 0; $k < $cnt; ++$k) {
+            if (!$used[$k] && isBoxBelow(strtolower($boxesall[$k]['unformatted']), 'inbox') &&
+                strtolower($boxesall[$k]['unformatted']) != 'inbox') {
+                $boxesnew[] = $boxesall[$k];
+                $used[$k] = true;
+            }
+        }
+        }
+
         /* List special folders and their subfolders, if requested. */
         if ($list_special_folders_first) {
             for($k = 0; $k < $cnt; ++$k) {
@@ -692,7 +703,7 @@
             }
         }
 
-
+        if ($default_sub_of_inbox) {
         /* Find INBOX's children */
         for($k = 0; $k < $cnt; ++$k) {
             if (!$used[$k] && isBoxBelow(strtolower($boxesall[$k]['unformatted']), 'inbox') &&
@@ -701,7 +712,7 @@
                 $used[$k] = true;
             }
         }
-
+        }
 
         /* Rest of the folders */
         for($k = 0; $k < $cnt; $k++) {
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
--
squirrelmail-users mailing list
Posting Guidelines: http://www.squirrelmail.org/wiki/MailingListPostingGuidelines
List Address: squirrelmail-users@xxxxxxxxxxxxxxxxxxxxx
List Archives: http://news.gmane.org/thread.php?group=gmane.mail.squirrelmail.user
List Archives:  http://sourceforge.net/mailarchive/forum.php?forum_id=2995
List Info: https://lists.sourceforge.net/lists/listinfo/squirrelmail-users

[Index of Archives]     [Video For Linux]     [Yosemite News]     [Yosemite Photos]     [gtk]     [KDE]     [Cyrus SASL]     [Gimp on Windows]     [Steve's Art]     [Webcams]

  Powered by Linux