[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@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@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éé.
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
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@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@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.
Latest versions of everything Dovecot 2.0.5 and Pigeonhole 0.2.1
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@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@kurkku] ~% cat > .dovecot.sieve require ["fileinto"]; if header :contains ["From"] "user@domain.com" { fileinto "ññoéé"; }
[tss@kurkku] ~% file .dovecot.sieve .dovecot.sieve: UTF-8 Unicode text
[tss@kurkku] ~% printf "From: user@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-)
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
participants (4)
-
Edward Carraro
-
Stephan Bosch
-
Timo Sirainen
-
William Blunn