Sieve: UTF-7 changes in 2.3.12p2?

Rob Mueller robm at fastmail.fm
Wed Sep 24 23:14:15 EDT 2008


> Is this a bad joke or am I missing something? Sieve scripts of most
> non-English-speakers are intentionally broken due to a BC breaking
> change in a bugfix release version?

I'm afraid you're not missing anything. It bit us as well :(

Fortunately for us, there weren't that many people with non-english folder 
names with filter rules, but for other people, this could be a pretty nasty 
change.

The change is actually the correct "fix", but dropping it in without any 
large "warning" in the changelog or release announcement is pretty rough.

Fixing all the existing sieve scripts shouldn't be too hard though. A perl 
1-liner could almost do it...

perl -pi -e 'use Encode; use Encode::IMAPUTF7; 
s/\bfileinto\s+"([^"]*)"/$f=$1;from_to($f,"IMAP-UTF-7","utf-8");$f;/ge;' 
/path/to/sievescripts/*

You'll need to recompile the script as well. Completely untested, but should 
get you on the way.

Rob



More information about the Info-cyrus mailing list