[ingo] Sieve UTF-8 fileinto (russian)

vuser1 at test123.ru vuser1 at test123.ru
Fri Dec 18 15:08:22 UTC 2009


>> Hello all,
>>
>> Ingo-sieve converts non-latin folder names into IMAP UTF-7, which 
>> doesn't work with dovecot.
>>
>> # Sieve Filter
>> # Generated by Ingo (http://www.horde.org/ingo/) (16.12.2009, 01:37:09)
>> # RussianFolder
>>
>> if header :comparator "i;ascii-casemap" :contains "Subject" "бла-бла"  {
>>    fileinto "&BCAEQwRBBEEEOgQwBE8EHwQwBD8EOgQw-";
>>    stop;
>> }
>>
>> Google says folder name must be in UTF-8 as well. I tried manually 
>> correct the script:
>>
>> if header :comparator "i;ascii-casemap" :contains "Subject" "бла-бла"  {
>>    fileinto "РусскаяПапка";
>>    stop;
>> }
>>
>> Modification works! I believe that ingo converts folder names to 
>> workaround Cyrus bug.
>
> I don't know if it's a bug, but I can confirm that Cyrus requires the 
> folders to be UTF-7 encoded.
>
>> 1) Is there config parameter to tell ingo-sieve to use UTF-8 for fileinto?
>> 2) If not, can someone help me to patch sources? I tried to change 
>> sieve.php:2554
>>    function toCode()
>>    {
>>        //return 'fileinto "' . 
>> Ingo_Script_sieve::escapeString($this->_vars['folder']) . '";';
>>        return 'fileinto "' . 
>> String::convertCharset($this->_vars['folder'], NLS::getCharset(), 
>> 'UTF-8') . '";';
>>    }
>> It doesn't work. It looks sieve.php receives already converted folder name.
>
> The folder name is utf-7 encoded, not in the current interface charset.
>
> Try this:
> http://lists.horde.org/archives/cvs/Week-of-Mon-20091214/090300.html

> 

It works! Thank you, Jan!


More information about the ingo mailing list