Mail with single \r, partial fetch, error "Broken virtual size in mailbox"
I run Dovecot 2.3.21 with the mdbox mailbox format.
If I do a certain partial fetch on a mail with a single carriage return \r Dovecot closes the connection and logs the following error:
Error: Mailbox INBOX: Deleting corrupted cache record uid=1: UID 1: Broken virtual size in mailbox INBOX: read(/var/spool/dovecot/user/storage/m.1): FETCH BODY[]<18.100> got too little data: 5 vs 6
This happens every time, doveadm force-resync doesn't help.
Here's how to reproduce the issue:
Deliver a mail with a single carriage return \r (here after the header/body separator, but that's not important):
echo -ne "Subject: Test\r\n\r\n\rBody\r\n" | doveadm save -u user
Then do a partial fetch from a specific offset:
. fetch 1 body[]<18.100>
- 1 FETCH (BODY[]<18> {6} ody Connection closed by foreign host.
Offset 18 with length 6 should "Body\r\n", that's why the response is 1 byte short ("got too little data: 5 vs 6" in the error message), by why is \r causing this? Other offsets seem to work.
On 7. Jan 2025, at 17.07, Ewald Dieterich via dovecot <dovecot@dovecot.org> wrote:
I run Dovecot 2.3.21 with the mdbox mailbox format.
Likely happens with all mailbox formats, at least also with sdbox.
If I do a certain partial fetch on a mail with a single carriage return \r Dovecot closes the connection and logs the following error:
Error: Mailbox INBOX: Deleting corrupted cache record uid=1: UID 1: Broken virtual size in mailbox INBOX: read(/var/spool/dovecot/user/storage/m.1): FETCH BODY[]<18.100> got too little data: 5 vs 6
Thanks, I can reproduce. I'll look into fixing it later. Tracking in DOP-3706.
On 10/01/2025 17:06 EET Timo Sirainen via dovecot <dovecot@dovecot.org> wrote:
On 7. Jan 2025, at 17.07, Ewald Dieterich via dovecot <dovecot@dovecot.org> wrote:
I run Dovecot 2.3.21 with the mdbox mailbox format.
Likely happens with all mailbox formats, at least also with sdbox.
If I do a certain partial fetch on a mail with a single carriage return \r Dovecot closes the connection and logs the following error:
Error: Mailbox INBOX: Deleting corrupted cache record uid=1: UID 1: Broken virtual size in mailbox INBOX: read(/var/spool/dovecot/user/storage/m.1): FETCH BODY[]<18.100> got too little data: 5 vs 6
Thanks, I can reproduce. I'll look into fixing it later. Tracking in DOP-3706.
Hi!
This has been fixed with https://github.com/dovecot/core/compare/fc88314aa45ca751d7d83d1307d46e11cfbe...
Aki Tuomi
On 14.01.25 11:23, Aki Tuomi via dovecot wrote:
This has been fixed with https://github.com/dovecot/core/compare/fc88314aa45ca751d7d83d1307d46e11cfbe...
Thank you very much!
Will this show up in a new release?
Am 15. Januar 2025 um 05:58 schrieb "Ewald Dieterich via dovecot" <dovecot@dovecot.org mailto:dovecot@dovecot.org?to=%22Ewald%20Dieterich%20via%20dovecot%22%20%3Cdovecot%40dovecot.org%3E >:
On 14.01.25 11:23, Aki Tuomi via dovecot wrote:
This has been fixed with https://github.com/dovecot/core/compare/fc88314aa45ca751d7d83d1307d46e11cfbe...
Yes.
Aki
On 15/01/2025 10:42 EET Schulz via dovecot <dovecot@dovecot.org> wrote:
Will this show up in a new release?
Am 15. Januar 2025 um 05:58 schrieb "Ewald Dieterich via dovecot" <dovecot@dovecot.org mailto:dovecot@dovecot.org?to=%22Ewald%20Dieterich%20via%20dovecot%22%20%3Cdovecot%40dovecot.org%3E >:
On 14.01.25 11:23, Aki Tuomi via dovecot wrote:
This has been fixed with https://github.com/dovecot/core/compare/fc88314aa45ca751d7d83d1307d46e11cfbe...
dovecot mailing list -- dovecot@dovecot.org To unsubscribe send an email to dovecot-leave@dovecot.org
participants (4)
-
Aki Tuomi
-
Ewald Dieterich
-
Schulz
-
Timo Sirainen