[Dovecot] CMU Sieve pluigin missing proper charset support
Hello,
After testing the Sieve plugin for the LDA, I have noticed that it does not handle charset issues properly. IETF draft says:
4.3. Subject and From Parameters
The ":subject" parameter specifies a subject line to attach to any vacation response that is generated. UTF-8 characters can be used in the string argument; implementations MUST convert the string to [RFC2047] encoded words if and only if non-ASCII characters are present. Implementations MUST generate an appropriate default subject line as specified below if no :subject parameter is specified.
(see http://tools.ietf.org/html/draft-ietf-sieve-vacation-07)
The problem is that the dovecot plugin does not convert the string to RFC2047 encoded words, it treats it literally and thus sends malformed (from RFC's point of view) message - with improper Subject field encoding.
Any chances of getting that fixed?
greetings,
Jan Srzednicki w@expro.pl
On Fri, 2007-06-01 at 18:49 +0200, Jan Srzednicki wrote:
The problem is that the dovecot plugin does not convert the string to RFC2047 encoded words, it treats it literally and thus sends malformed (from RFC's point of view) message - with improper Subject field encoding.
Any chances of getting that fixed?
Well.. Hmm. I'm not entirely sure how Cyrus handled it, or if it didn't handle it at all. The Sieve code is from Cyrus v2.2. In Cyrus v2.3 there's some new MIME code. Perhaps upgrading the Sieve plugin to Cyrus v2.3's code would fix this as well.
Also the APIs that need to be used to decode them are a bit annoying to use. I think I'll simplify them a bit for v1.1 so it won't be necessary to copy&paste 20 lines of code to use it.
I added this to my TODO, but if you're interested in fixing it now, I can give some pointers:
- dovecot-sieve-1.0/src/sieve-cmu.c : getheader() should decode them
- dovecot-1.0/src/lib-mail/message-header-decode.h API decodes the RFC2047 MIME words but doesn't convert to UTF8
- dovecot-1.0/src/lib-charset/charset-utf8.h API provides charset conversion.
- dovecot-1.0/src/lib-mail/message-header-search.c uses the above two APIs
For v1.1 I'll add a new function to message-header-decode.h that returns a given header directly as UTF-8 string.
participants (2)
-
Jan Srzednicki
-
Timo Sirainen