|
|
@ -7,7 +7,7 @@
|
|
|
|
* It's clickable interface which operates on text scripts and communicates
|
|
|
|
* It's clickable interface which operates on text scripts and communicates
|
|
|
|
* with server using managesieve protocol. Adds Filters tab in Settings.
|
|
|
|
* with server using managesieve protocol. Adds Filters tab in Settings.
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* @version 1.3
|
|
|
|
* @version 1.5
|
|
|
|
* @author Aleksander 'A.L.E.C' Machniak <alec@alec.pl>
|
|
|
|
* @author Aleksander 'A.L.E.C' Machniak <alec@alec.pl>
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* Configuration (see config.inc.php.dist):
|
|
|
|
* Configuration (see config.inc.php.dist):
|
|
|
@ -744,6 +744,9 @@ class managesieve extends rcube_plugin
|
|
|
|
$a_folders = $this->rc->imap->list_mailboxes();
|
|
|
|
$a_folders = $this->rc->imap->list_mailboxes();
|
|
|
|
$delimiter = $this->rc->imap->get_hierarchy_delimiter();
|
|
|
|
$delimiter = $this->rc->imap->get_hierarchy_delimiter();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// set mbox encoding
|
|
|
|
|
|
|
|
$mbox_encoding = $this->rc->config->get('managesieve_mbox_encoding', 'UTF7-IMAP');
|
|
|
|
|
|
|
|
|
|
|
|
if ($action['type'] == 'fileinto')
|
|
|
|
if ($action['type'] == 'fileinto')
|
|
|
|
$mailbox = $action['target'];
|
|
|
|
$mailbox = $action['target'];
|
|
|
|
else
|
|
|
|
else
|
|
|
@ -758,6 +761,9 @@ class managesieve extends rcube_plugin
|
|
|
|
if ($replace_delimiter = $this->rc->config->get('managesieve_replace_delimiter'))
|
|
|
|
if ($replace_delimiter = $this->rc->config->get('managesieve_replace_delimiter'))
|
|
|
|
$utf7folder = str_replace($delimiter, $replace_delimiter, $utf7folder);
|
|
|
|
$utf7folder = str_replace($delimiter, $replace_delimiter, $utf7folder);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// convert to Sieve implementation encoding
|
|
|
|
|
|
|
|
$utf7folder = $this->mbox_encode($utf7folder, $mbox_encoding);
|
|
|
|
|
|
|
|
|
|
|
|
if ($folder_class = rcmail_folder_classname($name))
|
|
|
|
if ($folder_class = rcmail_folder_classname($name))
|
|
|
|
$foldername = $this->gettext($folder_class);
|
|
|
|
$foldername = $this->gettext($folder_class);
|
|
|
|
else
|
|
|
|
else
|
|
|
@ -849,6 +855,10 @@ class managesieve extends rcube_plugin
|
|
|
|
return false;
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private function mbox_encode($text, $encoding)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
return rcube_charset_convert($text, 'UTF7-IMAP', $encoding);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
?>
|
|
|
|
?>
|
|
|
|