From 1029fc8de61bfeefb0f75a3fcb44f4eeb3e219f3 Mon Sep 17 00:00:00 2001
From: alecpl <alec@alec.pl>
Date: Thu, 17 Sep 2009 09:15:24 -0400
Subject: [PATCH] - Support multiple managesieve hosts using %h variable in managesieve_host option (#1486135)

---
 plugins/managesieve/managesieve.php |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/plugins/managesieve/managesieve.php b/plugins/managesieve/managesieve.php
index bfbded9..df1be8f 100644
--- a/plugins/managesieve/managesieve.php
+++ b/plugins/managesieve/managesieve.php
@@ -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'));

--
Gitblit v1.9.1