Sent emails (folder) corrupted after upgrade

Have you discovered a bug? Tell us about it.
Post Reply
amarc
Posts: 36
Joined: Thu 7. May 2020, 18:56

Sent emails (folder) corrupted after upgrade

Post by amarc »

STOP - Please read the next lines carefully!

1) Please fill out the post template below completely!
2) The members of this forum provide their valuable time to help! In return, please provide as much information as possible and be specific in your error description. Posts that show little initiative will probably not get good responses!

You may remove this top portion of the post template.
However, do not remove the following post template under any circumstances.
---------------------------------------------------------------------------


I'm sure the cause of the problem is within KeyHelp
(Problems not related to KeyHelp belong in the Offtopic forum)


Server operating system + version
(e.g. Ubuntu 20.04)

Debian 11

Server virtualization technology used
(e.g. none, OpenVZ, KVM, XEN, etc.)

KVM

KeyHelp version + build number
(e.g. 22.0 - Build 2366)

23.2.1.

Problem description / error messages

After being couple versions behind ( I think 23.0) I did upgrade of Keyhelp last night each after each version until latest. Now, all email's in Sent folder seem to be corrupted and also I have messages like these in mail.log:

Error: Mailbox Sent: Deleting corrupted cache record uid=167: UID 167: Broken physical size in mailbox Sent: read(/var/mail/vhosts/domain.com/user/.Sent/cur/1698341191.M538489P3782925.mx2,S=11484,W=11697:2,S) failed: Cached message size larger than expected (11484 > 3713, box=Sent, UID=167)


I tried to delete user(s) dovecot* cache files and restarting Dovecot but that did not help. Also, Roundcube can not display Sent messages folder and all new messages that are being sent are not visible there. New messages being sent are stored on server in Sent folder, they are not corrupted (but still can not be seen by Roundcube)


Did something major changed that could make this happen ?

This is what I mean by corrupted and how one email from Sent looks when I open it in text editor: https://i.imgur.com/SlSFoud.png


Expected result


Actual result


Steps to reproduce


Additional information
(e.g. recent changes to the server, excerpts from log files (/var/log/*, /var/log/keyhelp/php-error.log, etc.))
amarc
Posts: 36
Joined: Thu 7. May 2020, 18:56

Re: Sent emails (folder) corrupted after upgrade

Post by amarc »

EDIT to above I have confirmation from client using Outlook and I also tried in Apple Mail that these messages are readable. So somehow IMAP clients can read these messages but Roundcube can't.

Also tried changing to Snappy and issue is same
User avatar
Tobi
Community Moderator
Posts: 2832
Joined: Thu 5. Jan 2017, 13:24

Re: Sent emails (folder) corrupted after upgrade

Post by Tobi »

Please post screenshots as inline pictures from our server.
Do not use external image services.
Thank you!
Gruß,
Tobi


-----------------------------
wewoco.de
Das Forum für Reseller, Digital-Agenturen, Bildschirmarbeiter und Mäuseschubser
amarc
Posts: 36
Joined: Thu 7. May 2020, 18:56

Re: Sent emails (folder) corrupted after upgrade

Post by amarc »

After headbanging for 3+ hours and going nowhere, esentially this helped

https://xpufx.com/posts/dovecot_doveadm ... ize_error/

and I added (minding Keyhelp paths) in /etc/dovecot/local.conf

Code: Select all

mail_plugins = $mail_plugins zlib

protocol imap {
mail_plugins = $mail_plugins imap_quota zlib
}
Ofcourse Dovecot complained a bit with:
doveconf: Warning: /etc/dovecot/local.conf line 52: Global setting mail_plugins won't change the setting inside an earlier filter at /etc/dovecot/conf.keyhelp.d/20-protocols.conf line 11 (if this is intentional, avoid this warning by moving the global setting before /etc/dovecot/conf.keyhelp.d/20-protocols.conf line 11)
But I can live with it as I know all I do "custom" is in local.conf

Now bigger question is how this happened and what changed in these couple versions that this got broken ? :?
amarc
Posts: 36
Joined: Thu 7. May 2020, 18:56

Re: Sent emails (folder) corrupted after upgrade

Post by amarc »

@Alexander any idea why some version update would make all emails in 'Sent' basically gziped ? I can't find anywhere in Dovecot config where that is turned on
User avatar
Florian
Keyweb AG
Posts: 1261
Joined: Wed 20. Jan 2016, 02:28

Re: Sent emails (folder) corrupted after upgrade

Post by Florian »

Hello,

normally this indicates a problem with the file system.

No update can cause such issues
Mit freundlichen Grüßen / Best regards
Florian Cheno

**************************************************************
Keyweb AG - Die Hosting Marke
Neuwerkstr. 45/46, 99084 Erfurt / Germany
http://www.keyweb.de - http://www.keyhelp.de
**************************************************************
Post Reply