-
-
Notifications
You must be signed in to change notification settings - Fork 32.7k
Description
Bug report
Bug description:
Hi,
in a python script I open a maildir, modify some message flags with add_flag() and update and flush the maildir again. The message files are named correctly, but the lenght of the files are wrong.
In my case I found the reason in two header lines.
"Content-Type: application/zip; " and "Content-Disposition: attachment; " contain a tailing space and that is removed when flushing the maildir.
The result is, that dovecote in the standard config throws an error. I know that there is a dovecot setting to ignore the caches size, but this is only a workaround and no real fix.
Broken physical size in mailbox Server/DMARC: read(/home/.../Maildir/.Server.DMARC/cur/1754216389.M736853P3583460.deb-vps2,S=5932,W=6025:2,FS) failed: Cached message size larger than expected (5932 > 5930, box=Server/DMARC, UID=6)
In my opinion update / flush must not modify the mailfile in any cases to prevent broken dkim signatures and this issue I explain.
with kind regards, TC
CPython versions tested on:
3.11
Operating systems tested on:
Linux