[Dovecot] mozilla, error in imap command uid
Hello.
Mozilla (1.7.3) gives me the following error message when trying to view some messages:
the mail server responded: Error in IMAP command UID: Invalid BODY[..] parameter: Missing '>' in '<10240.-7730>'.
What's wrong ?
Thanks.
-- Nicolas
On Fri, 3 Dec 2004, Nicolas Kowalski wrote:
Mozilla (1.7.3) gives me the following error message when trying to view some messages:
the mail server responded: Error in IMAP command UID: Invalid BODY[..] parameter: Missing '>' in '<10240.-7730>'.
I have the same error message with thundebird 0.9.
It happens when I select a message which is just after one containing an attachment (ordering is order received).
Also, the message list pane is wrong ; the message sizes displayed do not match for example ; the given size is always the one of the previous message.
-- Nicolas
On 3.12.2004, at 15:23, Nicolas Kowalski wrote:
the mail server responded: Error in IMAP command UID: Invalid BODY[..] parameter: Missing '>' in '<10240.-7730>'.
imap_client_workarounds = tb-negative-fetch fixes this.
Also, the message list pane is wrong ; the message sizes displayed do not match for example ; the given size is always the one of the previous message.
I finally checked this myself. The problem is that Thunderbird requires that the RFC822.SIZE reply comes before BODY[HEADER.FIELDS(..)], otherwise it breaks this way. I'd rather not change the order in which Dovecot returns the replies, so getting Thunderbird people to fix it would be good idea.
On Fri, 3 Dec 2004, Timo Sirainen wrote:
On 3.12.2004, at 15:23, Nicolas Kowalski wrote:
the mail server responded: Error in IMAP command UID: Invalid BODY[..] parameter: Missing '>' in '<10240.-7730>'.
imap_client_workarounds = tb-negative-fetch fixes this.
Sorry, I missed this one.
Also, the message list pane is wrong ; the message sizes displayed do not match for example ; the given size is always the one of the previous message.
I finally checked this myself. The problem is that Thunderbird requires that the RFC822.SIZE reply comes before BODY[HEADER.FIELDS(..)], otherwise it breaks this way. I'd rather not change the order in which Dovecot returns the replies, so getting Thunderbird people to fix it would be good idea.
Others servers (uw, cyrus) return these replies "correctly" (ie. the way tb/mozilla understand them correctly), so why not dovecot ?
Thanks.
-- Nicolas
On 3.12.2004, at 19:06, Nicolas.Kowalski@imag.fr wrote:
I finally checked this myself. The problem is that Thunderbird requires that the RFC822.SIZE reply comes before BODY[HEADER.FIELDS(..)], otherwise it breaks this way. I'd rather not change the order in which Dovecot returns the replies, so getting Thunderbird people to fix it would be good idea.
Others servers (uw, cyrus) return these replies "correctly" (ie. the way tb/mozilla understand them correctly), so why not dovecot ?
Others reply like: * 1 FETCH (UID 1 RFC822.SIZE 123456 BODY.PEEK[HEADER.FIELDS (xxx)]{100} From: foo To: bar ) Dovecot replies like: * 1 FETCH (BODY.PEEK[HEADER.FIELDS (xxx)]{100} From: foo To: bar UID 1 RFC822.SIZE 123456) Both are valid from IMAP point of view so it's Thunderbird's problem that it doesn't parse the replies correctly. It's a bit easier for Dovecot to reply the way it does now, and I'd rather not change it just because one client has problems reading it correctly. This patch would anyway fix it: diff -u -r1.15 imap-fetch-body.c --- imap-fetch-body.c 20 Oct 2004 18:09:32 -0000 1.15 +++ imap-fetch-body.c 3 Dec 2004 16:39:41 -0000 @@ -824,13 +824,23 @@ static int fetch_rfc822_size(struct imap_fetch_context *ctx, struct mail *mail, void *context __attr_unused__) { + const char *str; uoff_t size; size = mail->get_virtual_size(mail); if (size == (uoff_t)-1) return -1; - str_printfa(ctx->cur_str, "RFC822.SIZE %"PRIuUOFF_T" ", size); + if (ctx->first) + ctx->first = FALSE; + else { + if (o_stream_send(ctx->client->output, " ", 1) < 0) + return -1; + } + + str = t_strdup_printf("RFC822.SIZE %"PRIuUOFF_T, size); + if (o_stream_send_str(ctx->client->output, str) < 0) + return -1; return 1; }
On Fri, 3 Dec 2004, Timo Sirainen wrote:
It's a bit easier for Dovecot to reply the way it does now, and I'd rather not change it just because one client has problems reading it correctly. This patch would anyway fix it:
Thanks for the patch, it resolved this issue.
Unfortunately, it also has the effect that now, some messages including (non-text) attachments can not be viewed anymore in these *$ MUAs (no problem in pine). :-(
-- Nicolas
On 3.12.2004, at 20:26, Nicolas.Kowalski@imag.fr wrote:
It's a bit easier for Dovecot to reply the way it does now, and I'd rather not change it just because one client has problems reading it correctly. This patch would anyway fix it:
Thanks for the patch, it resolved this issue.
Unfortunately, it also has the effect that now, some messages including (non-text) attachments can not be viewed anymore in these *$ MUAs (no problem in pine). :-(
There are probably similiar problems with other fields than rfc822.size which causes it to break. Well, lets see if they get it fixed: https://bugzilla.mozilla.org/show_bug.cgi?id=272988
Le 12/03/2004 07:39 PM, Timo Sirainen a écrit :
There are probably similiar problems with other fields than rfc822.size which causes it to break. Well, lets see if they get it fixed: https://bugzilla.mozilla.org/show_bug.cgi?id=272988
There has been no activity on this bug since you submitted it :(
Actually, your patch solved this issue, so I was wondering if you would consider introducing one more Thunderbird workaround in Dovecot ? :) Otherwise, do you think it is safe to leave Dovecot patched like this ?
Regards,
Nico Mais si, Linux est user-friendly. Mais Linux il choisit ses amis, lui !
I'd like to search the archive before I ask some potentially answered questions. But I can't seem to login in the dovecot.org imap server with the instructions given on the site, as auth keeps failing. I was using anonymous as the authentication method and "anonymous"/empty password when prompted. Any pointers?
Thanks, __Luke
On 3.12.2004, at 15:30, Luke wrote:
I'd like to search the archive before I ask some potentially answered questions. But I can't seem to login in the dovecot.org imap server with the instructions given on the site, as auth keeps failing. I was using anonymous as the authentication method and "anonymous"/empty password when prompted. Any pointers?
Fixed now. Maybe it even stays working for a while :)
participants (5)
-
Luke
-
Nicolas Kowalski
-
Nicolas STRANSKY
-
Nicolas.Kowalski@imag.fr
-
Timo Sirainen