Ticket #3119 (new defect)

Opened 2 months ago

Last modified 2 months ago

problem setting Fcc to save email on Zimbra IMAP server

Reported by: aris Owned by: mutt-dev
Priority: major Milestone:
Component: mutt Version:
Keywords: zimbra fcc literal data Cc:

Description

Hello, our company recently migrated to Zimbra and I've been storing the sent-email on a IMAP folder. Since we moved to Zimbra, we (me and other mutt users) have problems with some messages while saving to Fcc folder. It's consistent with a message but not for all messages. There's nothing I could identify that would trigger this. Here's some info: version: 1.5.18 (Fedora rawhide package) I'm trying to find a non internal mail that trigger the problem to send you the full debug output, but what I checked: - the size sent to Zimbra on APPEND:

    a0008 APPEND "INBOX.sent-mail" (\Seen) {1143}^M
    5< + send literal data 

matches the message size.

- at the end of the message, a \r\n is sent by mutt, but instead

of answering with

    5< a0008 OK [APPENDUID 176542 92201] APPEND completed

the server responds with

    5< + send literal data

- I wrote a sample patch that solves the problem:

--- mutt-1.5.18.orig/imap/message.c     2008-01-29 23:26:50.000000000 -0500
+++ mutt-1.5.18/imap/message.c  2008-09-17 16:13:55.000000000 -0400
@@ -651,10 +651,15 @@ int imap_append_message (CONTEXT *ctx, M
   mutt_socket_write (idata->conn, "\r\n");
   fclose (fp);

-  do
+  do {
     rc = imap_cmd_step (idata);
-  while (rc == IMAP_CMD_CONTINUE);

+    if (rc == IMAP_CMD_RESPOND) {
+      /* I hate you zimbra */
+      imap_exec (idata, "NOOP", 0);
+    }
+  } while (rc == IMAP_CMD_CONTINUE);
+
   if (!imap_code (idata->buf))
   { 
     char *pc;

but that, of course is just a workaround. I have no problems so far using this patch.

- one clue, that happens consistently with this particular message:

    (data)
    xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxUpdating progress: 1022
    5> xxxxxxxxxxxxxxxxxxxx ^M

I'm not familiar with the mutt code, but one guess would be that the "+ send literal data" may come because the message transmit was interrupted in the middle for progress display. and it's only received after the remaining part is sent, causing confusion.

I know it may be a Zimbra IMAP bug, but I'd like to hear from you before. This may ring a bell.

Thanks

Attachments

msg-good.txt (0.6 kB) - added by dtardon 2 months ago.
a good message
msg-bad.txt (0.7 kB) - added by dtardon 2 months ago.
a bad message

Change History

Changed 2 months ago by dtardon

I think I've found a trigger for this problem--it's size of the message. After experimenting with meaningless messages I've got following results--a message containing 665 characters is saved right, whilst any one containing 666 (I actually don't believe there is any coincidence :) or more characters is rejected as described above.

Changed 2 months ago by dtardon

a good message

Changed 2 months ago by dtardon

a bad message

Changed 2 months ago by Michael Tatge

* On Tue, Sep 23, 2008 06:45AM -0000 Mutt (fleas@mutt.org) wrote:

Since mutt is working fine with cyrus, I'd tend to think this is a imapd
bug.

HTH,

Michael
Note: See TracTickets for help on using tickets.