Changeset 4133 in subversion
- Timestamp:
- Oct 25, 2010 9:08:54 AM (3 years ago)
- Location:
- trunk/plugins/managesieve
- Files:
-
- 4 edited
-
Changelog (modified) (1 diff)
-
config.inc.php.dist (modified) (1 diff)
-
lib/rcube_sieve.php (modified) (2 diffs)
-
managesieve.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/plugins/managesieve/Changelog
r4071 r4133 1 - Added support for SASL proxy authentication (#1486691) 2 1 3 * version 2.10 [2010-10-10] 2 4 ----------------------------------------------------------- -
trunk/plugins/managesieve/config.inc.php.dist
r3808 r4133 15 15 // or none. Optional, defaults to best method supported by server. 16 16 $rcmail_config['managesieve_auth_type'] = null; 17 18 // Optional managesieve authentication identifier to be used as authorization proxy. 19 // Authenticate as a different user but act on behalf of the logged in user. 20 // Works with PLAIN and DIGEST-MD5 auth. 21 $rcmail_config['managesieve_auth_cid'] = null; 22 23 // Optional managesieve authentication password to be used for imap_auth_cid 24 $rcmail_config['managesieve_auth_pw'] = null; 17 25 18 26 // use or not TLS for managesieve server connection -
trunk/plugins/managesieve/lib/rcube_sieve.php
r4068 r4133 45 45 * @param array Disabled extensions 46 46 * @param boolean Enable/disable debugging 47 * @param string Proxy authentication identifier 48 * @param string Proxy authentication password 47 49 */ 48 50 public function __construct($username, $password='', $host='localhost', $port=2000, 49 $auth_type=null, $usetls=true, $disabled=array(), $debug=false) 51 $auth_type=null, $usetls=true, $disabled=array(), $debug=false, 52 $auth_cid=null, $auth_pw=null) 50 53 { 51 54 $this->sieve = new Net_Sieve(); … … 54 57 $this->sieve->setDebug(true, array($this, 'debug_handler')); 55 58 } 59 56 60 if (PEAR::isError($this->sieve->connect($host, $port, NULL, $usetls))) { 57 61 return $this->_set_error(SIEVE_ERROR_CONNECTION); 58 62 } 63 64 if (!empty($auth_cid)) { 65 $authz = $username; 66 $username = $auth_cid; 67 $password = $auth_pw; 68 } 69 59 70 if (PEAR::isError($this->sieve->login($username, $password, 60 $auth_type ? strtoupper($auth_type) : null ))71 $auth_type ? strtoupper($auth_type) : null, $authz)) 61 72 ) { 62 73 return $this->_set_error(SIEVE_ERROR_LOGIN); 63 74 } 75 64 76 $this->disabled = $disabled; 65 77 } -
trunk/plugins/managesieve/managesieve.php
r4071 r4133 75 75 $this->rc->config->get('managesieve_usetls', false), 76 76 $this->rc->config->get('managesieve_disabled_extensions'), 77 $this->rc->config->get('managesieve_debug', false) 77 $this->rc->config->get('managesieve_debug', false), 78 $this->rc->config->get('managesieve_auth_cid'), 79 $this->rc->config->get('managesieve_auth_pw') 78 80 ); 79 81
Note: See TracChangeset
for help on using the changeset viewer.
