Added GSSAPI support for issue #5779 - requires updated Net_Sieve class. See https://github.com/neilmunday/Net_Sieve/Sieve.php

pull/6184/head
neilmunday 7 years ago
parent c9555506b3
commit b4298bc096

@ -1,3 +1,4 @@
- Added GSSAPI support(#5779) - requires updated Net_Sieve class
- Added option managesieve_default_headers
- Added option managesieve_forward to enable settings dialog for simple forwarding (#6021)
- Support filter action with custom IMAP flags (#6011)

@ -59,10 +59,11 @@ class rcube_sieve
* @param string Proxy authentication identifier
* @param string Proxy authentication password
* @param array List of options to pass to stream_context_create().
* @param string Kerberos service principal to use with GSSAPI authentication method
*/
public function __construct($username, $password='', $host='localhost', $port=2000,
$auth_type=null, $usetls=true, $disabled=array(), $debug=false,
$auth_cid=null, $auth_pw=null, $options=array())
$auth_cid=null, $auth_pw=null, $options=array(), $servicePrincipal=null)
{
$this->sieve = new Net_Sieve();
@ -70,6 +71,10 @@ class rcube_sieve
$this->sieve->setDebug(true, array($this, 'debug_handler'));
}
if (isset($servicePrincipal)) {
$this->sieve->setServicePrincipal($servicePrincipal);
}
$result = $this->sieve->connect($host, $port, $options, $usetls);
if (is_a($result, 'PEAR_Error')) {

@ -196,6 +196,7 @@ class rcube_sieve_engine
'auth_cid' => $this->rc->config->get('managesieve_auth_cid'),
'auth_pw' => $this->rc->config->get('managesieve_auth_pw'),
'socket_options' => $this->rc->config->get('managesieve_conn_options'),
'service_principal' => $this->rc->config->get('krb_authentication_context')
));
// Handle per-host socket options
@ -213,7 +214,8 @@ class rcube_sieve_engine
$plugin['debug'],
$plugin['auth_cid'],
$plugin['auth_pw'],
$plugin['socket_options']
$plugin['socket_options'],
$plugin['service_principal']
);
$error = $this->sieve->error();

Loading…
Cancel
Save