[Dovecot] FTS Plugin design

Rui Carneiro rui.carneiro at portugalmail.net
Tue May 19 16:40:23 EEST 2009


Citando Timo Sirainen <tss at iki.fi>:
> All the data comes from lib-mail/message-decoder.c. Hmm. Looks like it
> tries to force giving only valid UTF-8 output. I guess it should have
> some flag or something that makes it do that only for text/* parts, not
> for binary parts. OK, implemented, see if it works with this and using
> the flag:
> 
> http://hg.dovecot.org/dovecot-1.2/rev/44548a7fb10d
> 

It is working now but I needed to do some changes on your code.

When you check charset_utf8 and charset_trans you have a problem on attachments case. Attachments part do not have any charset defined on headers so, by default, charset_utf8=1 and charset_trans is garbage (I have no idea where that garbage came from).

To avoid this problem swap the some lines of code that set ctx->binary_input to the function's beginning.

Please see the attachment to checked any problem that may exist.

Thank you,
Rui Carneiro
---
Portugalmail, Comunicações S.A.
www.portugalmail.net


More information about the dovecot mailing list