[Dovecot] Size detection/replair does not work with zlib

Christian Rohmann christian.rohmann at frittentheke.de
Wed Dec 18 19:40:47 EET 2013

Hey dovecot-users,

Am 12.12.2013 22:01, schrieb Frerich Raabe:
> On 2013-12-12 12:47, Roland Rosenfeld wrote:
>> 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.

Yeah this is the method to "repair" the files manually.But regarding 
Dovecot the following question arises:

Could Dovecot, a.k.a Timo, not just simply implement this method of 
fixing the size of uncompressed emails? I mean it is able to determine 
the uncompressed size, so why not use that instead of the physical 
on-disk size / fstat value if the file is compressed?

This would make Dovecot just much more robust when dealing with 
compressed files.



-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3752 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://dovecot.org/pipermail/dovecot/attachments/20131218/f2947272/attachment.bin>

More information about the dovecot mailing list