Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/roundcube/roundcubemail.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/managesieve/lib/Roundcube/rcube_sieve_engine.php')
-rw-r--r--plugins/managesieve/lib/Roundcube/rcube_sieve_engine.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/plugins/managesieve/lib/Roundcube/rcube_sieve_engine.php b/plugins/managesieve/lib/Roundcube/rcube_sieve_engine.php
index ce6bc384c..a09f456e6 100644
--- a/plugins/managesieve/lib/Roundcube/rcube_sieve_engine.php
+++ b/plugins/managesieve/lib/Roundcube/rcube_sieve_engine.php
@@ -184,8 +184,14 @@ class rcube_sieve_engine
list($host, $scheme, $port) = rcube_utils::parse_host_uri($plugin['host']);
+ // Support explicit STARTTLS by establishing an unencrypted TCP connection, then instructing Net_Sieve to send the `STARTTLS` command.
$tls = $scheme === 'tls';
+ // Support implicit SSL by passing the URI scheme through to Net_Sieve -> Net_Socket -> stream_socket_client().
+ if ($scheme === 'ssl') {
+ $host = 'ssl://' . $host;
+ }
+
if (empty($port)) {
$port = getservbyname('sieve', 'tcp') ?: self::PORT;
}