[Dovecot] sieve delivery to utf folders

Stephan Bosch stephan at rename-it.nl
Fri Jul 31 10:06:04 EEST 2009


Nikita Koshikov schreef:
> On Thu, 30 Jul 2009 17:06:35 +0200
> Stephan Bosch <stephan at rename-it.nl> wrote:
> 
>> You are using mUTF-7 in folder names. According to the Sieve 
>> specification, you must use the UTF-8 version. The fileinto command 
>> internally translates this to the mUTF-7 equivalent, so that the IMAP 
>> server sees it as expected. This is a change of about half a year ago:
>>
>> http://hg.rename-it.nl/dovecot-1.2-sieve/rev/fc0395d50d04
>>
> How can I set utf-8 as folder names ? my $LANG is ru_RU.UTF-8 now.
> I might misunderstand something, but why client created folder name in mUTF-7 and sieve fileinto internally converted mUTF-7 name are not the same ?
> 
> /usr/libexec/dovecot/imap-utf7 -r "тест"
> &BEIENQRBBEI-				// this is like clients create mail
> 
> /usr/libexec/dovecot/imap-utf7 "&BEIENQRBBEI-"
> тест					//this decoding fine
> 
> /usr/libexec/dovecot/imap-utf7 "&-BEIENQRBBEI-"
> &BEIENQRBBEI-				//this is like sieve created folder looks in the mail-client programs.
Well, I guess the final situation is caused by the fact that the folder 
name is encoded in mUTF7 two times.

At my end the following Sieve script works as expected:

require "fileinto";

fileinto "тест";

Result:

Jul 31 09:01:02 xi dovecot: deliver(stephan): sieve: 
msgid=<20090729182144.4c9baf96 at jimbo>: stored mail into mailbox 
'&BEIENQRBBEI-'

I guess you are doing:

require "fileinto";

fileinto "&BEIENQRBBEI-";

Result:

Jul 31 09:04:53 xi dovecot: deliver(stephan): sieve: 
msgid=<20090729182144.4c9baf96 at jimbo>: stored mail into mailbox 
'&-BEIENQRBBEI-'

So, use the "тест" UTF-8 string in your scripts directly.

Regards,

-- 
Stephan Bosch
stephan at rename-it.nl


More information about the dovecot mailing list