How to use non-ascii charsets with sieve?

Lawrence Greenfield leg+ at
Mon Dec 9 15:59:38 EST 2002

You bring up good questions.

First, our Sieve implementation currently doesn't deal with RFC 2047
encoded headers---or rather, it just compares the undecoded headers
against the UTF-8 string. This is obviously a bug which sadly isn't in

Ken and I talked (a long time ago) about this. The main issue is that
Cyrus's character comparison routines remove whitespace and always
perform casemapping, and this is probably inappropriate for Sieve's
use. Fixing this is probably not difficult, but I'd prefer not to have
multiple different canonicalization tables.

The "fileinto" problem is more straightforward and should be fixed in

I would add a function to mboxname.[ch] of mboxname_utf8tomutf7() and
then make sieve_fileinto() call it.


   Date: Mon, 9 Dec 2002 19:53:37 +0900 (JST)
   From: Mark Keasling <mark at>
   <script language="sieve" version="RFC-3028">
     # pretend this is encoded in UTF-8

     require ["reject","fileinto"];

     if header :contains "Subject" "セミナー報告"
       fileinto "セミナー報告" ;

   I don't know how the make timsieved decode mime headers or
   MUTF-7 encode mailbox names.

   Mark Keasling <mark at>

More information about the Info-cyrus mailing list