diff options
author | alecpl <alec@alec.pl> | 2009-09-17 13:15:24 +0000 |
---|---|---|
committer | alecpl <alec@alec.pl> | 2009-09-17 13:15:24 +0000 |
commit | 1029fc8de61bfeefb0f75a3fcb44f4eeb3e219f3 (patch) | |
tree | 5f755643a7ad1f2c0fad530ad6394d0707aecb16 /plugins | |
parent | 00a833811ebbba72b48aa90dae81833d3e4a50bc (diff) |
- Support multiple managesieve hosts using %h variable in managesieve_host option (#1486135)
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/managesieve/Changelog | 3 | ||||
-rw-r--r-- | plugins/managesieve/config.inc.php.dist | 3 | ||||
-rw-r--r-- | plugins/managesieve/managesieve.php | 2 |
3 files changed, 6 insertions, 2 deletions
diff --git a/plugins/managesieve/Changelog b/plugins/managesieve/Changelog index e68e9c7e9..dd144b2f6 100644 --- a/plugins/managesieve/Changelog +++ b/plugins/managesieve/Changelog @@ -1,3 +1,6 @@ +- Support multiple managesieve hosts using %h variable + in managesieve_host option + * version 1.6 [2009-09-08] ----------------------------------------------------------- - Fix warning when importing squirrelmail rules diff --git a/plugins/managesieve/config.inc.php.dist b/plugins/managesieve/config.inc.php.dist index 1f0bdef65..c9ea44e76 100644 --- a/plugins/managesieve/config.inc.php.dist +++ b/plugins/managesieve/config.inc.php.dist @@ -3,7 +3,8 @@ // managesieve server port $rcmail_config['managesieve_port'] = 2000; -// managesieve server address +// managesieve server address, default is localhost. +// Use %h variable as replacement for user's IMAP hostname $rcmail_config['managesieve_host'] = 'localhost'; // use or not TLS for managesieve server connection diff --git a/plugins/managesieve/managesieve.php b/plugins/managesieve/managesieve.php index bfbded94e..df1be8fe2 100644 --- a/plugins/managesieve/managesieve.php +++ b/plugins/managesieve/managesieve.php @@ -62,7 +62,7 @@ class managesieve extends rcube_plugin // try to connect to managesieve server and to fetch the script $this->sieve = new rcube_sieve($_SESSION['username'], $this->rc->decrypt($_SESSION['password']), - $this->rc->config->get('managesieve_host', 'localhost'), + str_replace('%h', $_SESSION['imap_host'], $this->rc->config->get('managesieve_host', 'localhost')), $this->rc->config->get('managesieve_port', 2000), $this->rc->config->get('managesieve_usetls', false), $this->rc->config->get('managesieve_disabled_extensions')); |