summaryrefslogtreecommitdiff
path: root/lib/KolabAdmin/Sieve/Segment/Delivery.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/KolabAdmin/Sieve/Segment/Delivery.php')
-rw-r--r--lib/KolabAdmin/Sieve/Segment/Delivery.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/KolabAdmin/Sieve/Segment/Delivery.php b/lib/KolabAdmin/Sieve/Segment/Delivery.php
index 1addd51..b5f5a4d 100644
--- a/lib/KolabAdmin/Sieve/Segment/Delivery.php
+++ b/lib/KolabAdmin/Sieve/Segment/Delivery.php
@@ -83,7 +83,9 @@ extends KolabAdmin_Sieve_Segment
{
return array(
($this->isActive()) ? 'true, ## delivery enabled' : 'false, ## delivery disabled',
- $this->getDeliveryFolder()
+ // UTF7-conversion handles a specific cyrus bug. This does not work
+ // when using dovecot for example. The sieve RFC requires UTF8.
+ String::convertCharset($this->getDeliveryFolder(), 'utf-8', 'utf7-imap')
);
}
@@ -95,7 +97,7 @@ extends KolabAdmin_Sieve_Segment
public function parseDeliveryFolder($script)
{
if (preg_match("/fileinto \"INBOX\/([^\"]*)\";/", $script, $regs)) {
- $this->setDeliveryFolder($regs[1]);
+ $this->setDeliveryFolder(String::convertCharset($regs[1], 'utf7-imap', 'utf-8'));
}
}
} \ No newline at end of file