mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-13 03:27:39 +03:00
Sieve is always UTF-8
This commit is contained in:
parent
afcd76adbf
commit
769ac33bcd
3 changed files with 2 additions and 14 deletions
|
|
@ -349,7 +349,6 @@ Enables caching in the system'),
|
||||||
'smtp_show_server_errors' => array(false),
|
'smtp_show_server_errors' => array(false),
|
||||||
'smtp_use_auth_plain' => array(true),
|
'smtp_use_auth_plain' => array(true),
|
||||||
'smtp_use_auth_cram_md5' => array(false),
|
'smtp_use_auth_cram_md5' => array(false),
|
||||||
'sieve_utf8_folder_name' => array(true),
|
|
||||||
'sieve_auth_plain_initial' => array(true),
|
'sieve_auth_plain_initial' => array(true),
|
||||||
'sieve_allow_fileinto_inbox' => array(false),
|
'sieve_allow_fileinto_inbox' => array(false),
|
||||||
'imap_timeout' => array(300),
|
'imap_timeout' => array(300),
|
||||||
|
|
|
||||||
|
|
@ -6,8 +6,6 @@ class Sieve
|
||||||
{
|
{
|
||||||
const NEW_LINE = "\r\n";
|
const NEW_LINE = "\r\n";
|
||||||
|
|
||||||
public static $bUtf8FolderName = true;
|
|
||||||
|
|
||||||
public static function collectionToFileString(array $aFilters) : string
|
public static function collectionToFileString(array $aFilters) : string
|
||||||
{
|
{
|
||||||
$sNL = static::NEW_LINE;
|
$sNL = static::NEW_LINE;
|
||||||
|
|
@ -353,17 +351,9 @@ class Sieve
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case Enumerations\ActionType::MOVE_TO:
|
case Enumerations\ActionType::MOVE_TO:
|
||||||
$sValue = $oFilter->ActionValue();
|
$sFolderName = $oFilter->ActionValue();
|
||||||
if (\strlen($sValue))
|
if (\strlen($sFolderName))
|
||||||
{
|
{
|
||||||
$sFolderName = $sValue; // utf7-imap
|
|
||||||
if (static::$bUtf8FolderName) // to utf-8
|
|
||||||
{
|
|
||||||
$sFolderName = \MailSo\Base\Utils::ConvertEncoding($sFolderName,
|
|
||||||
\MailSo\Base\Enumerations\Charset::UTF_7_IMAP,
|
|
||||||
\MailSo\Base\Enumerations\Charset::UTF_8);
|
|
||||||
}
|
|
||||||
|
|
||||||
$aCapa['fileinto'] = true;
|
$aCapa['fileinto'] = true;
|
||||||
$aResult[] = $sTab.'fileinto "'.static::quote($sFolderName).'";';
|
$aResult[] = $sTab.'fileinto "'.static::quote($sFolderName).'";';
|
||||||
if ($oFilter->Stop())
|
if ($oFilter->Stop())
|
||||||
|
|
|
||||||
|
|
@ -84,7 +84,6 @@ class SieveStorage implements FiltersInterface
|
||||||
public function Save(\RainLoop\Model\Account $oAccount, string $sScriptName, array $aFilters, string $sRaw = '') : bool
|
public function Save(\RainLoop\Model\Account $oAccount, string $sScriptName, array $aFilters, string $sRaw = '') : bool
|
||||||
{
|
{
|
||||||
if ($aFilters && !$sRaw) {
|
if ($aFilters && !$sRaw) {
|
||||||
Sieve::$bUtf8FolderName = !!$this->oConfig->Get('labs', 'sieve_utf8_folder_name', true);
|
|
||||||
$sRaw = Sieve::collectionToFileString($aFilters);
|
$sRaw = Sieve::collectionToFileString($aFilters);
|
||||||
}
|
}
|
||||||
$oSieveClient = $this->getConnection($oAccount);
|
$oSieveClient = $this->getConnection($oAccount);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue