summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authoralec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>2011-02-04 16:50:05 +0000
committeralec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>2011-02-04 16:50:05 +0000
commit24a118a3479a8ee0a04b4e3c25689501639e0bc2 (patch)
tree3855f06f71fa70949dac47c6693436ec8dcc5f53 /plugins
parent5e3878adc1f038a778df58cd468b33b9f08972f9 (diff)
- Fix STARTTLS for timsieved < 2.3.10
git-svn-id: https://svn.roundcube.net/trunk@4495 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'plugins')
-rw-r--r--plugins/managesieve/Changelog2
-rw-r--r--plugins/managesieve/lib/Net/Sieve.php8
2 files changed, 9 insertions, 1 deletions
diff --git a/plugins/managesieve/Changelog b/plugins/managesieve/Changelog
index 582eb0353..a634815a4 100644
--- a/plugins/managesieve/Changelog
+++ b/plugins/managesieve/Changelog
@@ -1,3 +1,5 @@
+- Fix STARTTLS for timsieved < 2.3.10
+
* version 3.0 [2011-02-01]
-----------------------------------------------------------
- Added support for SASL proxy authentication (#1486691)
diff --git a/plugins/managesieve/lib/Net/Sieve.php b/plugins/managesieve/lib/Net/Sieve.php
index 14989ff0b..d4cc3eeda 100644
--- a/plugins/managesieve/lib/Net/Sieve.php
+++ b/plugins/managesieve/lib/Net/Sieve.php
@@ -1161,7 +1161,13 @@ class Net_Sieve
// The server should be sending a CAPABILITY response after
// negotiating TLS. Read it, and ignore if it doesn't.
- $this->_doCmd();
+ // Doesn't work with older timsieved versions
+ $regexp = '/^CYRUS TIMSIEVED V([0-9.]+)/';
+ if (!preg_match($regexp, $this->_capability['implementation'], $matches)
+ || version_compare($matches[1], '2.3.10', '>=')
+ ) {
+ $this->_doCmd();
+ }
// RFC says we need to query the server capabilities again now that we
// are under encryption.