MBOX-Line: From gds at chartertn.net  Fri Sep 13 00:21:21 2019
To: imap-protocol@u.washington.edu
From: Gene Smith <gds@chartertn.net>
Date: Fri Sep 13 00:21:43 2019
Subject: [Imap-protocol] Errors on imap APPEND with gmail server.
Message-ID: <296d9a9a-a6d3-d50a-ebf4-07550c1c2e6d@chartertn.net>

Often Thunderbird users have the need to copy many message from local 
storage to an imap folder and have reported problems. Thunderbird uses a 
separate imap append command for each message to accomplish this. But 
occasionally, for example when the destination server is gmail, a BAD 
response will occur to the append, e.g., 6249 BAD Invalid Arguments: 
Unable to parse message.

However, if the exact same append command is repeated, it succeeds.

I have checked to verify that exactly the same data and data length is 
sent when the append fails and when it succeeds. I verified this by 
saving the command transactions with wireshark.

I've seen this occur at random points in the copy, such as after 
approximately 4000 messages, about 400 messages etc, but so far, on the 
retry the append succeeds.

Not sure if the problem is specific to gmail. But since it is very 
commonly used, I have tested with it first.

Gene
