Permalink
Browse files

- Added option imap_force_lsub for some buggy LIST-EXTENDED implement…

…ations (#1486225)
  • Loading branch information...
1 parent eeb85f4 commit f75f65ce47d62f0efbe52b4520030c73727d4c7e @alecpl alecpl committed Nov 3, 2010
Showing with 9 additions and 1 deletion.
  1. +6 −0 config/main.inc.php.dist
  2. +3 −1 program/include/rcube_imap.php
View
6 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;
View
4 program/include/rcube_imap.php
@@ -2827,7 +2827,9 @@ private function _list_mailboxes($root='', $filter='*')
}
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'));

0 comments on commit f75f65c

Please sign in to comment.