Hello list, Today, my users have noticed, that delivery to folders with non-english names is broken. For example, if I create russian directory, it correct encoded and display into mail-client program and my webmail: Encoded: Normal view .INBOX.&BEIENQRBBEI- ???? This is part of sieve script, which routing delivery to russian folder. .... elsif allof (header :contains "Subject" "qwe") { fileinto "INBOX/&BEIENQRBBEI-"; } But, when actualy delivery take place, in logs I have Jul 30 17:13:49 deliver(koshikov.n at domain.com): Info: sieve: msgid=<4A71A9E6.5040301 at domain.com>: stored mail into mailbox 'INBOX/&-BEIENQRBBEI- And folder .INBOX.&-BEIENQRBBEI- appears in users maildir. This folder can't be unencoded by mail-client program and user see exactly "&-BEIENQRBBEI-" under INBOX directory(also normaly encoded directory "&BEIENQRBBEI-" --> "????" displays correct). Something breaks encoding and adds sing "-" to all words in utf encoded directory names. I can't tell exactly when this problem appear, but I remember that I have tested delivery to russian directories by sieve scripts and all worked fine. My current dovecot installation is 1.2.2, dovecot-sieve-0.1.9 and managesieve-0.11.7
Nikita Koshikov schreef:> Hello list, > > Today, my users have noticed, that delivery to folders with non-english names is broken. For example, if I create russian directory, it correct encoded and display into mail-client program and my webmail: > Encoded: Normal view > .INBOX.&BEIENQRBBEI- ???? > > This is part of sieve script, which routing delivery to russian folder. > .... > elsif allof (header :contains "Subject" "qwe") > { > fileinto "INBOX/&BEIENQRBBEI-"; > } > > But, when actualy delivery take place, in logs I have > > Jul 30 17:13:49 deliver(koshikov.n at domain.com): Info: sieve: msgid=<4A71A9E6.5040301 at domain.com>: stored mail into mailbox 'INBOX/&-BEIENQRBBEI- > > And folder .INBOX.&-BEIENQRBBEI- appears in users maildir. This folder can't be unencoded by mail-client program and user see exactly "&-BEIENQRBBEI-" under INBOX directory(also normaly encoded directory "&BEIENQRBBEI-" --> "????" displays correct). Something breaks encoding and adds sing "-" to all words in utf encoded directory names. > > I can't tell exactly when this problem appear, but I remember that I have tested delivery to russian directories by sieve scripts and all worked fine. > > My current dovecot installation is 1.2.2, dovecot-sieve-0.1.9 and managesieve-0.11.7You 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 Regards, -- Stephan Bosch stephan at rename-it.nl
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.