Hi

I'm having problems with zlib giving an error in dovecot.index.cache, when I move a message from one folder to another, this error often appears "Cached message size smaller / biger than expected":

Feb 03 19:02:07 imap(julio@xxx.com.br): Error: Corrupted record in index cache file /var/spool/vmail/vmail01/xxx.com.br/julio//Maildir/.Trash/dovecot.index.cache: UID 503914: Broken physical size in mailbox Trash: read(zlib(/var/spool/vmail/vmail01/xxx.com.br/julio//Maildir/.Trash/cur/1612388618.M2222P27195.saturn,S=34225,W=34342:2,S)) failed: Cached message size smaller than expected (34225 < 40960, box=Trash, UID=503914)

I'm using the [1] dovecot-maildir-compress.sh script in crontab daily to compress old messages with 7 days old with bzip2.

Crontab line:

30  2   *   *   *  /usr/local/sbin/dovecot-maildir-compress.sh -t 7 /var/spool/vmail/vmail01/ > /dev/null 2>&1


Any suggestions on how to fix this error?

[1] - https://github.com/extremeshok/dovecot-maildir-compression/blob/master/dovecot-maildir-compress.sh

Thanks.

-- 
----------------------------------
    _    Engº Julio Cesar Covolato
   0v0   <julio@psi.com.br>
  /(_)\  F: 55-11-99175-9260
   ^ ^   PSI INTERNET
----------------------------------