The troubles continue with the version 1.0.10. I sort-of patched it up
with the attached hack just to get by, because the situation was terrible
with A LOT of messages causing the sudden disconnect of the dovecot server.

It is always off by exactly two bytes:

Jan  3 18:08:28 bonkers dovecot: IMAP(mi): FETCH for mailbox INBOX UID 40703 
got too little data: 4916 vs 4918
Jan  3 18:08:28 bonkers dovecot: IMAP(mi): Local patch: pretending, sent-size 
matches virtual
Jan  3 18:08:29 bonkers dovecot: IMAP(mi): FETCH for mailbox INBOX UID 40615 
got too little data: 4452 vs 4454
Jan  3 18:08:29 bonkers dovecot: IMAP(mi): Local patch: pretending, sent-size 
matches virtual
Jan  3 18:08:30 bonkers dovecot: IMAP(mi): FETCH for mailbox INBOX UID 40703 
got too little data: 4916 vs 4918
Jan  3 18:08:30 bonkers dovecot: IMAP(mi): Local patch: pretending, sent-size 
matches virtual

If you'd like, I can upload a sample mbox for your testing -- there is
nothing particularly private in it, and it is all in Russian anyway :)

But something needs to be done -- urgently... Thanks! Yours,

 -mi
--- src/imap/imap-fetch-body.c	Fri Dec 28 11:36:47 2007
+++ src/imap/imap-fetch-body.c	Tue Jan  1 18:59:56 2008
@@ -201,6 +201,10 @@ static off_t imap_fetch_send(struct imap
 			mailbox_get_name(ctx->mail->box), ctx->mail->uid,
 			(uoff_t)sent, virtual_size);
-		o_stream_close(output);
-		return -1;
+		if ((uoff_t)sent != virtual_size-2){
+			o_stream_close(output);
+			return -1;
+		}
+		i_error("Local patch: pretending, sent-size matches virtual");
+		sent = virtual_size;
 	}
 

Reply via email to