Edward Carraro
2010-Oct-13 18:04 UTC
[Dovecot] managesieve fileinto folder with international characters
I have a folder created in dovecot entered by the user as "??o??" On the file system it appears as "&APEA8Q-o&AOkA6Q-" (mUTF7) When creating a sieve rule, to file into the folder ??o??, I am converting the name from UTF8 into UTF7, the rule becomes require ["fileinto"]; if header :contains ["From"] "user at domain.com" { fileinto "&APEA8Q-o&AOkA6Q-"; } however when executed, a sieve log is generated saying: failed to store into mailbox '&APEA8Q-o&AOkA6Q-' (&-APEA8Q-o&-AOkA6Q-): Mailbox doesn't exist: &-APEA8Q-o&-AOkA6Q-. If I directly modify the sieve file and place the actual utf8 version of the folder in it require ["fileinto"]; if header :contains ["From"] "user at domain.com" { fileinto "??o??"; } I get the following error: main_script: line 1: error: folder name specified for fileinto command is not utf-8: ??o??.
William Blunn
2010-Oct-13 18:11 UTC
[Dovecot] managesieve fileinto folder with international characters
On 13/10/2010 19:04, Edward Carraro wrote:> main_script: line 1: error: folder name specified for fileinto command is not utf-8: ??o??.Which versions of things are you using? There is a thread on a similar topic here http://www.dovecot.org/list/dovecot/2010-August/051780.html with a repository commit by Timo mentioned here http://www.dovecot.org/list/dovecot/2010-August/051927.html Bill
Stephan Bosch
2010-Oct-13 18:15 UTC
[Dovecot] managesieve fileinto folder with international characters
Op 13-10-2010 20:04, Edward Carraro schreef:> I have a folder created in dovecot entered by the user as "??o??" > > On the file system it appears as "&APEA8Q-o&AOkA6Q-" (mUTF7) > > When creating a sieve rule, to file into the folder ??o??, I am converting > the name from UTF8 into UTF7, the rule becomes > > require ["fileinto"]; > if header :contains ["From"] "user at domain.com" > { > fileinto "&APEA8Q-o&AOkA6Q-"; > } > > > however when executed, a sieve log is generated saying: > > failed to store into mailbox '&APEA8Q-o&AOkA6Q-' (&-APEA8Q-o&-AOkA6Q-): > Mailbox doesn't exist:&-APEA8Q-o&-AOkA6Q-.So far, behavior is correct. Sieve uses UTF-8, whereas IMAP and mail store use mUTF-7.> If I directly modify the sieve file and place the actual utf8 version of the > folder in it > > require ["fileinto"]; > if header :contains ["From"] "user at domain.com" > { > fileinto "??o??"; > } > > I get the following error: > > main_script: line 1: error: folder name specified for fileinto command is > not utf-8: ??o??. >A while back there was a bug in Dovecot UTF-8 verification. That should be fixed now. What versions of Dovecot and Pigeonhole are you using? Regards, Stephan.
Edward Carraro
2010-Oct-13 18:19 UTC
[Dovecot] managesieve fileinto folder with international characters
Latest versions of everything Dovecot 2.0.5 and Pigeonhole 0.2.1
Timo Sirainen
2010-Oct-14 14:23 UTC
[Dovecot] managesieve fileinto folder with international characters
On Wed, 2010-10-13 at 14:04 -0400, Edward Carraro wrote:> If I directly modify the sieve file and place the actual utf8 version of the > folder in it > > require ["fileinto"]; > if header :contains ["From"] "user at domain.com" > { > fileinto "??o??"; > }This should work.> main_script: line 1: error: folder name specified for fileinto command is > not utf-8: ??o??.Like others said, this really looks as if you're running older Dovecot version. Is it possible that only e.g. your dovecot-lda is an older version or something? Or that you weren't actually typing valid UTF-8 in the script? [tss at kurkku] ~% cat > .dovecot.sieve require ["fileinto"]; if header :contains ["From"] "user at domain.com" { fileinto "??o??"; } [tss at kurkku] ~% file .dovecot.sieve .dovecot.sieve: UTF-8 Unicode text [tss at kurkku] ~% printf "From: user at domain.com\n\nplop\n" | dovecot-lda And the result: Oct 14 15:20:59 lda(29534 tss): Info: sieve: msgid=unspecified: subject=: stored mail into mailbox '??o??' (&APEA8Q-o&AOkA6Q-)
Edward Carraro
2010-Oct-14 15:39 UTC
[Dovecot] managesieve fileinto folder with international characters
Thanks guys! My putty terminal was using ISO-8859 encoding by default and my java client was generating ASCII files Changing putty to UTF8, I was able to get it working by creating the file directly on the filesystem :/# file .dovecot.sieve .dovecot.sieve: UTF-8 Unicode text and through telnet :/# file .dovecot.sieve .dovecot.sieve: UTF-8 Unicode text, with CRLF line terminators
Maybe Matching Threads
- sieve / managesieve: unknown Sieve capability 'imapflags'
- Migrating from Cyrus to Dovecot
- execvp /usr/local/libexec/dovecot/dovecot-lda: Permission denied
- Sieve envelope :detail "to" "extention" does not deliver to fileinto destination
- strange regex sieve filter error