On Dec 9, 2013, at 11:41 PM, Robert Schetterer <r...@sys4.de> wrote:

> Am 10.12.2013 01:08, schrieb Terry Barnum:
>> I'm trying to undo a dovecot zlib test and uncompress 6 emails in my Junk 
>> mailbox. There are about 25 total in different mailboxes but I thought I'd 
>> first start with those in my Junk. I ran:
>> 
>> # dsync -v -u te...@dop.com -m Junk -o plugin/zlib_save= backup 
>> maildir:/path/to/temp/folder
>> 
>> which returned without error and backed up my Junk mailbox but didn't 
>> uncompress the 6 emails. Am I calling dsync incorrectly to uncompress? zlib 
>> is currently not loaded as a plugin.
> 
> as far i know, dove/dsync always looks at the conf, so to notice
> compressed mail the zlib plugin might have to be enabled ever , -o
> plugin/zlib_save= should be fine to decompress, please retest with zlib
> plugin enabled, testmails to decompress should be compressed by dovecot
> itself and not from elsewhere, that should work as my tests with 2.1.x,
> if it fails again it might be broken with 2.2.9

Thank you Robert, you were correct. I temporarily enabled zlib and ran dsync 
with verbose output. I think I could've also just added -o mail_plugins=zlib 
but I didn't think of it until later.

# dsync -v -u te...@dop.com -m MyMailbox -o plugin/zlib_save= backup 
maildir:/path/to/temp/folder

dsync(te...@dop.com): Error: Cached message size smaller than expected (4236 < 
8192)
dsync(te...@dop.com): Error: Maildir filename has wrong S value, renamed the 
file from 
.../terry/.MyMailbox/cur/1386272980.M20857P20282.mailbox.dop.com,S=4236:2,S to 
.../terry/.MyMailbox/cur/1386272980.M20857P20282.mailbox.dop.com,S=4236:2,S
dsync(te...@dop.com): Error: Corrupted index cache file 
.../terry/.MyMailbox/dovecot.index.cache: Broken physical size for mail UID 
37695

These 3 lines are repeated again. Why does dsync rename the file to the same 
name?

I was able to import the now uncompressed email back into dovecot:

# doveadm -v import -u te...@dop.com maildir:/path/to/temp/folder "" mailbox 
MyMailbox SENTON 2013-12-05

doveadm(te...@dop.com): Error: Cached message size smaller than expected (4236 
< 8192)
doveadm(te...@dop.com): Error: Maildir filename has wrong S value, renamed the 
file from 
/path/to/temp/folder/.MyMailbox/cur/1386272980.M20857P20282.mailbox.dop.com,S=4236:2,S
 to 
/path/to/temp/folder/.MyMailbox/cur/1386272980.M20857P20282.mailbox.dop.com,S=10267:2,S
doveadm(te...@dop.com): Error: Corrupted index cache file 
/path/to/temp/folder/.MyMailbox/dovecot.index.cache: Broken physical size for 
mail UID 37695
doveadm(te...@dop.com): Error: Cached message size smaller than expected (4236 
< 10267)
doveadm(te...@dop.com): Error: Corrupted index cache file 
/path/to/temp/folder/.MyMailbox/dovecot.index.cache: Broken physical size for 
mail UID 37695

Hopefully this might help someone who ends up in the same situation.

-Terry

Terry Barnum
digital OutPost
http://www.dop.com

Reply via email to