On 2013-12-12 12:47, Roland Rosenfeld wrote:
Hi!
Usually dovecot auto detects or repairs the size of a maildir message. So I can place a message named "foo" in the cur directory and dovecot uses it.
Now I tried the same with a zlib compressed message but here dovecot doesn't recognize/repair the size of the message.
When I access this folder via IMAP the connection is diconnected and in dovecot logs I see the following error messages:
[..]
Error: Cached message size smaller than expected (805 < 2666) Error: Maildir filename has wrong S value, renamed the file from /somedir/cur/1386772057.M152553P9709.host,S=805:2, to /somedir/cur/1386772057.M152553P9709.host,S=805:2,
So here dovecot detects the wrong S value, but instead of fixing it by using the uncompressed size, it renames to the same file name as before...
I observed exactly the same issue ever since I enabled the zlib plugin on our IMAP server, running dovecot 2.1.7.
For what it's worth, I wrote a small shell script which, given a Maildir directory, looks for all files for which the S= value doesn't match the effective file size (i.e. for zlib-compressed files, the S= value should match the *uncompressed* file size, for plain files the S= value should match the physical file sie). The script the attempts to print appropriate 'mv' commands for renaming the files as needed. Maybe it helps, I attached it to this mail.
-- Frerich Raabe - raabe@froglogic.com www.froglogic.com - Multi-Platform GUI Testing