Aleksander Machniak
2013-07-02 ed3e51f1b41d818ae757220fd41cdf0b093b20f6
Make possible to disable some (broken) IMAP extensions with imap_disable_caps option (#1489184)
Add some notes in INSTALL about broken ESEARCH in uw-imap.
5 files modified
29 ■■■■■ changed files
CHANGELOG 1 ●●●● patch | view | raw | blame | history
INSTALL 11 ●●●● patch | view | raw | blame | history
config/main.inc.php.dist 8 ●●●●● patch | view | raw | blame | history
program/lib/Roundcube/rcube.php 1 ●●●● patch | view | raw | blame | history
program/lib/Roundcube/rcube_imap_generic.php 8 ●●●●● patch | view | raw | blame | history
CHANGELOG
@@ -1,6 +1,7 @@
CHANGELOG Roundcube Webmail
===========================
- Make possible to disable some (broken) IMAP extensions with imap_disable_caps option (#1489184)
- Contacts drag-n-drop default action is to move contacts (#1488751)
- Added possibility to choose to move or copy contacts from drag-n-drop menu (#1488751)
- Fix messages list sorting with THREAD=REFS
INSTALL
@@ -52,7 +52,8 @@
4. Point your browser to http://url-to-roundcube/installer/
5. Follow the instructions of the install script (or see MANUAL CONFIGURATION)
6. After creating and testing the configuration, remove the installer directory
7. Done!
7. Check Known Issues section of this file
8. Done!
CONFIGURATION HINTS
@@ -135,7 +136,6 @@
To keep your database slick and clean we recommend to periodically execute
bin/cleandb.sh which finally removes all records that are marked as deleted.
Best solution is to install a cronjob running this script daily.
MANUAL CONFIGURATION
@@ -233,3 +233,10 @@
    compress.filetype = ("text/plain", "text/html", "text/javascript", "text/css", "text/xml", "image/gif", "image/png")
}
KNOWN ISSUES
============
Installations with uw-imap server should set imap_disabled_caps = array('ESEARCH')
in main configuration file. ESEARCH implementation in this server is broken (#1489184).
config/main.inc.php.dist
@@ -107,12 +107,20 @@
// 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.
// Deprecated: Use imap_disabled_caps = array('LIST-EXTENDED')
$rcmail_config['imap_force_lsub'] = false;
// Some server configurations (e.g. Courier) doesn't list folders in all namespaces
// Enable this option to force listing of folders in all namespaces
$rcmail_config['imap_force_ns'] = false;
// List of disabled imap extensions.
// Use if your IMAP server has broken implementation of some feature
// and you can't remove it from CAPABILITY string on server-side.
// For example UW-IMAP server has broken ESEARCH.
// Note: Because the list is cached, re-login is required after change.
$rcmail_config['imap_disabled_caps'] = array();
// IMAP connection timeout, in seconds. Default: 0 (no limit)
$rcmail_config['imap_timeout'] = 0;
program/lib/Roundcube/rcube.php
@@ -377,6 +377,7 @@
            'auth_pw'     => $this->config->get("{$driver}_auth_pw"),
            'debug'       => (bool) $this->config->get("{$driver}_debug"),
            'force_caps'  => (bool) $this->config->get("{$driver}_force_caps"),
            'disabled_caps' => $this->config->get("{$driver}_disabled_caps"),
            'timeout'     => (int) $this->config->get("{$driver}_timeout"),
            'skip_deleted' => (bool) $this->config->get('skip_deleted'),
            'driver'      => $driver,
program/lib/Roundcube/rcube_imap_generic.php
@@ -715,6 +715,10 @@
            $auth_method = 'CHECK';
        }
        if (!empty($this->prefs['disabled_caps'])) {
            $this->prefs['disabled_caps'] = array_map('strtoupper', (array)$this->prefs['disabled_caps']);
        }
        $result = false;
        // initialize connection
@@ -3686,6 +3690,10 @@
        $this->capability = explode(' ', strtoupper($str));
        if (!empty($this->prefs['disabled_caps'])) {
            $this->capability = array_diff($this->capability, $this->prefs['disabled_caps']);
        }
        if (!isset($this->prefs['literal+']) && in_array('LITERAL+', $this->capability)) {
            $this->prefs['literal+'] = true;
        }