This is actually a bug with Gimap (Gmail's IMAP server), but since it results in a passthrough disconnect of an entire webmail session, we may want to workaround it or handle it somehow.
A bug exists in Gimap (Gmail's IMAP server) for certain messages (in my case, I've found it seems to affected all messages from at least on particular sender). When I delete the message by moving it to trash, Gimap closes the connection, as if it has crashed. The message is actually moved to trash successfully, but the IMAP connection has been torn down. I discovered this through my webmail software, but reproduced it in a simple test using openssl s_client
as well:
16 UID MOVE 46214 "[Gmail]/Trash"
4007DFF6697F0000:error:0A000126:SSL routines:ssl3_read_n:unexpected eof while reading:../ssl/record/rec_layer_s3.c:307:
#
Interestingly, it's only moving from INBOX to Trash that causes Gimap to close the connection. Moving from Trash to INBOX doesn't result in this disconnection.
Note: Copies of the offending emails (from L.P.) are stored on INT, so they can be copied to a Gmail account for testing.
Action item:
I have reported this to Gmail. If they do not respond and fix the issue, then a workaround for buggy Gmail servers should be added for the MOVE/UID MOVE commands in net_imap
such that if a disconnect is detected, we re-establish the client connection, check if the UID exists, and if not, report success anyways (since the MOVE seems to have happened).
Further investigation would also need to be done to see:
You must be