[Svn] r2963 - trunk/roundcubemail/plugins/managesieve

trac at roundcube.net trac at roundcube.net
Thu Sep 17 15:15:24 CEST 2009


Author: alec
Date: 2009-09-17 08:15:24 -0500 (Thu, 17 Sep 2009)
New Revision: 2963

Modified:
   trunk/roundcubemail/plugins/managesieve/Changelog
   trunk/roundcubemail/plugins/managesieve/config.inc.php.dist
   trunk/roundcubemail/plugins/managesieve/managesieve.php
Log:
- Support multiple managesieve hosts using %h variable in managesieve_host option (#1486135)


Modified: trunk/roundcubemail/plugins/managesieve/Changelog
===================================================================
--- trunk/roundcubemail/plugins/managesieve/Changelog	2009-09-17 13:06:31 UTC (rev 2962)
+++ trunk/roundcubemail/plugins/managesieve/Changelog	2009-09-17 13:15:24 UTC (rev 2963)
@@ -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

Modified: trunk/roundcubemail/plugins/managesieve/config.inc.php.dist
===================================================================
--- trunk/roundcubemail/plugins/managesieve/config.inc.php.dist	2009-09-17 13:06:31 UTC (rev 2962)
+++ trunk/roundcubemail/plugins/managesieve/config.inc.php.dist	2009-09-17 13:15:24 UTC (rev 2963)
@@ -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

Modified: trunk/roundcubemail/plugins/managesieve/managesieve.php
===================================================================
--- trunk/roundcubemail/plugins/managesieve/managesieve.php	2009-09-17 13:06:31 UTC (rev 2962)
+++ trunk/roundcubemail/plugins/managesieve/managesieve.php	2009-09-17 13:15:24 UTC (rev 2963)
@@ -62,7 +62,7 @@
     // 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'));

_______________________________________________
http://lists.roundcube.net/mailman/listinfo/svn



More information about the Svn mailing list