Hi,

For some of our user accounts, the IMAP server on our ZCS installation abruptly closes the connection to the client. Please see the IMAP debug log below:

Code:
2012-04-24 15:32:54,785 DEBUG [ImapServer-1] [name=ashley@example.com;ip=192.168.20.20;] imap - opening folder: Sent
2012-04-24 15:32:54,788 DEBUG [ImapServer-1] [name=ashley@example.com;ip=192.168.20.20;] imap -   ** iterating (collapseExpunged)
2012-04-24 15:32:54,789 DEBUG [ImapServer-1] [name=ashley@example.com;ip=192.168.20.20;] imap - copying message data from existing session: Sent
2012-04-24 15:32:54,789 DEBUG [ImapServer-1] [name=ashley@example.com;ip=192.168.20.20;] imap - paging session during close: Sent
2012-04-24 15:32:54,789 DEBUG [ImapServer-1] [name=ashley@example.com;ip=192.168.20.20;] imap -   ** iterating (collapseExpunged)
2012-04-24 15:32:54,790 DEBUG [ImapServer-1] [name=ashley@example.com;ip=192.168.20.20;] imap - added [com.zimbra.cs.imap.ImapMessage@103, com.zimbra.cs.imap.ImapMessage@104, com.zimbra.cs.imap.ImapMessage@105, com.zimbra.cs.imap.ImapMessage@106, com.zimbra.cs.imap.ImapMessage@107, com.zimbra.cs.imap.ImapMessage@108, com.zimbra.cs.imap.ImapMessage@154, com.zimbra.cs.imap.ImapMessage@155, com.zimbra.cs.imap.ImapMessage@157, com.zimbra.cs.imap.ImapMessage@158, com.zimbra.cs.imap.ImapMessage@159, com.zimbra.cs.imap.ImapMessage@15a]
2012-04-24 15:32:54,790 INFO  [ImapServer-1] [name=ashley@example.com;ip=192.168.20.20;] imap - selected folder Sent
2012-04-24 15:32:54,831 DEBUG [ImapServer-1] [name=ashley@example.com;mid=46;ip=192.168.20.20;] imap -   S: * 1 FETCH (UID 259 FLAGS (\Seen))
2012-04-24 15:32:54,832 DEBUG [ImapServer-1] [name=ashley@example.com;mid=46;ip=192.168.20.20;] imap -   S: * 2 FETCH (UID 260 FLAGS (\Seen))
2012-04-24 15:32:54,832 DEBUG [ImapServer-1] [name=ashley@example.com;mid=46;ip=192.168.20.20;] imap -   S: * 3 FETCH (UID 261 FLAGS (\Seen))
2012-04-24 15:32:54,833 DEBUG [ImapServer-1] [name=ashley@example.com;mid=46;ip=192.168.20.20;] imap -   S: * 4 FETCH (UID 262 FLAGS (\Seen))
2012-04-24 15:32:54,833 DEBUG [ImapServer-1] [name=ashley@example.com;mid=46;ip=192.168.20.20;] imap -   S: * 5 FETCH (UID 263 FLAGS (\Seen))
2012-04-24 15:32:54,834 DEBUG [ImapServer-1] [name=ashley@example.com;mid=46;ip=192.168.20.20;] imap -   S: * 6 FETCH (UID 264 FLAGS (\Seen))
2012-04-24 15:32:54,834 DEBUG [ImapServer-1] [name=ashley@example.com;mid=46;ip=192.168.20.20;] imap -   S: * 7 FETCH (UID 340 FLAGS (\Seen))
2012-04-24 15:32:54,834 DEBUG [ImapServer-1] [name=ashley@example.com;mid=46;ip=192.168.20.20;] imap -   S: * 8 FETCH (UID 341 FLAGS (\Seen))
2012-04-24 15:32:54,835 DEBUG [ImapServer-1] [name=ashley@example.com;mid=46;ip=192.168.20.20;] imap -   S: * 9 FETCH (UID 343 FLAGS (\Seen))
2012-04-24 15:32:54,835 DEBUG [ImapServer-1] [name=ashley@example.com;mid=46;ip=192.168.20.20;] imap -   S: * 10 FETCH (UID 344 FLAGS (\Seen))
2012-04-24 15:32:54,836 DEBUG [ImapServer-1] [name=ashley@example.com;mid=46;ip=192.168.20.20;] imap -   S: * 11 FETCH (UID 345 FLAGS (\Seen))
2012-04-24 15:32:54,836 DEBUG [ImapServer-1] [name=ashley@example.com;mid=46;ip=192.168.20.20;] imap -   S: * 12 FETCH (UID 346 FLAGS (\Seen))
2012-04-24 15:32:56,501 INFO  [ImapServer-1] [name=ashley@example.com;mid=46;ip=192.168.20.20;] imap - S: Message-ID: BAD parse error: command not implemented
2012-04-24 15:32:56,502 INFO  [ImapServer-1] [name=ashley@example.com;mid=46;ip=192.168.20.20;] imap - S: Date: BAD parse error: command not implemented
2012-04-24 15:32:56,502 INFO  [ImapServer-1] [name=ashley@example.com;mid=46;ip=192.168.20.20;] imap - S: From: BAD parse error: command not implemented
2012-04-24 15:32:56,502 INFO  [ImapServer-1] [name=ashley@example.com;mid=46;ip=192.168.20.20;] imap - S: User-Agent: BAD parse error: command not implemented
2012-04-24 15:32:56,503 INFO  [ImapServer-1] [] imap - dropping connection for user ashley@example.com (server-initiated)
2012-04-24 15:32:56,503 INFO  [ImapServer-1] [] ProtocolHandler - Handler exiting normally
(real email domain name replaced with example.com)

The same error is occurring with multiple accounts.

Any idea how to fix this, and prevent it from happening in future?