On 15.10.2013, at 23.33, Reinaldo Matukuma <ramatuk...@hotmail.com> wrote:

> Hello. Probably only Timo can help-me with this.
> 
> I have a self-made plugin based on the zlib plugin that i use to cryptograph 
> the messages at inbox.
> 
> As a side-effect of the cryptography, my plugin changes the size of the 
> message, but until 2.0.19 this works well with dovecot index and the W/S 
> flags.
> 
> But now, i'm going to upgrade to 2.1.17 and now i have these messages on log 
> at my test ambiance:
> 
> Oct 15 20:19:25 test dovecot: imap(reina...@exemplo.com.br): Error: Cached 
> message size smaller than expected (367 < 529)
> Oct 15 20:19:25 test dovecot: imap(reina...@exemplo.com.br): Error: Maildir 
> filename has wrong S value, renamed the file from 
> /storage/test/messages/exemplo.com.br/reinaldo/Maildir/.Sent/cur/1381879158.M634385P5208.test,S=367,W=378:2,S
>  to 
> /storage/test/messages/exemplo.com.br/reinaldo/Maildir/.Sent/cur/1381879158.M634385P5208.test,S=529:2,S
> Oct 15 20:19:25 test dovecot: imap(reina...@exemplo.com.br): Error: Corrupted 
> index cache file 
> /storage/test/messages/exemplo.com.br/reinaldo/Maildir/.Sent/dovecot.index.cache:
>  Broken physical size for mail UID 6

Is it intended that when decrypting messages you’ll get exactly the original 
message back? Or are you also modifying the message? Assuming there is no 
modification, you could take a look at how 
http://dovecot.org/patches/2.2/mail-filter.tar.gz does that without problems. 
Message modifications should also be possible with that code with small 
modifications. I’m not sure if that code works for v2.1.

Reply via email to