summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2010-11-03 08:29:27 +0000
committeralecpl <alec@alec.pl>2010-11-03 08:29:27 +0000
commitf75f65ce47d62f0efbe52b4520030c73727d4c7e (patch)
tree096a212df0647815edf4c65bfde3a22baadfee2b
parenteeb85f425760028fd87515f6c7a186ab100283ec (diff)
- Added option imap_force_lsub for some buggy LIST-EXTENDED implementations (#1486225)
-rw-r--r--config/main.inc.php.dist6
-rw-r--r--program/include/rcube_imap.php4
2 files changed, 9 insertions, 1 deletions
diff --git a/config/main.inc.php.dist b/config/main.inc.php.dist
index d85b507ef..eed34cadb 100644
--- a/config/main.inc.php.dist
+++ b/config/main.inc.php.dist
@@ -84,6 +84,12 @@ $rcmail_config['imap_delimiter'] = null;
// after login. Set to True if you've got this case.
$rcmail_config['imap_force_caps'] = false;
+// By default list of subscribed folders is determined using LIST-EXTENDED
+// extension if available. Some servers (dovecot 1.x) returns wrong results
+// for shared namespaces in this case. http://trac.roundcube.net/ticket/1486225
+// Enable this option to force LSUB command usage instead.
+$rcmail_config['imap_force_lsub'] = false;
+
// IMAP connection timeout, in seconds. Default: 0 (no limit)
$rcmail_config['imap_timeout'] = 0;
diff --git a/program/include/rcube_imap.php b/program/include/rcube_imap.php
index 473e914b9..3d04937fc 100644
--- a/program/include/rcube_imap.php
+++ b/program/include/rcube_imap.php
@@ -2827,7 +2827,9 @@ class rcube_imap
}
else {
// Server supports LIST-EXTENDED, we can use selection options
- if ($this->get_capability('LIST-EXTENDED')) {
+ $config = rcmail::get_instance()->config;
+ // #1486225: Some dovecot versions returns wrong result using LIST-EXTENDED
+ if (!$config->get('imap_force_lsub') && $this->get_capability('LIST-EXTENDED')) {
// This will also set mailbox options, LSUB doesn't do that
$a_folders = $this->conn->listMailboxes($this->mod_mailbox($root), $filter,
NULL, array('SUBSCRIBED'));