Here's a copy of my Mercury IMAP log when the error happens..
Any ideas ??
00:14:07.078: Connection from 10.10.10.2, Sun May 18 00:14:07 2008<lf>
00:14:07.093: << * OK xxxx.com IMAP4rev1 Mercury/32 v4.52 server ready.<cr><lf>
00:14:07.093: >> A001 LOGIN "testuser" "xxxxxx"<cr><lf>
00:14:07.093: << A001 OK LOGIN completed.<cr><lf>
00:14:07.093: >> A002 SELECT "INBOX"<cr><lf>
00:14:07.109: << * 135 EXISTS<cr><lf>
00:14:07.109: << * 0 RECENT<cr><lf>
00:14:07.109: << * FLAGS (\Deleted \Draft \Seen \Answered)<cr><lf>
00:14:07.109: << * OK [UIDVALIDITY 1095969924] UID Validity<cr><lf>
00:14:07.109: << * OK [UIDNEXT 31024] Predicted next UID<cr><lf>
00:14:07.109: << * OK [PERMANENTFLAGS (\Deleted \Draft \Seen \Answered)] Settable message flags<cr><lf>
00:14:07.109: << A002 OK [READ-WRITE] SELECT completed.<cr><lf>
00:14:07.109: >> A003 EXPUNGE<cr><lf>
00:14:07.109: << A003 OK EXPUNGE complete.<cr><lf>
00:14:07.125: >> A004 LIST "" "INBOX.Sent"<cr><lf>
00:14:07.125: << * LIST (\NoInferiors) "/" INBOX.Sent<cr><lf>
00:14:07.125: << A004 OK LIST completed.<cr><lf>
00:14:07.125: >> A005 APPEND "" (\Seen) {1369}<cr><lf>
00:14:07.125: << A005 NO [TRYCREATE] No such folder.<cr><lf>
00:14:07.140: >> Received: from 10.10.10.1 ([10.10.10.1])<cr><lf>
00:14:07.140: << Received: BAD Unrecognized or out-of-state command.<cr><lf>
00:14:07.140: >> (SquirrelMail authenticated user testuser)<cr><lf>
00:14:07.140: << (SquirrelMail BAD Unrecognized or out-of-state command.<cr><lf>
00:14:07.140: >> by webmail.local with HTTP;<cr><lf>
00:14:07.140: << by BAD Unrecognized or out-of-state command.<cr><lf>
00:14:07.140: >> Sun, 18 May 2008 00:14:07 +0100 (GMT Daylight Time)<cr><lf>
00:14:07.140: << Sun, BAD Unrecognized or out-of-state command.<cr><lf>
00:14:07.140: >> Message-ID: <4b67a831ce86f3509fa5a7ec586aab41.squirrel@webmail.local><cr><lf>
00:14:07.140: << Message-ID: BAD Unrecognized or out-of-state command.<cr><lf>
00:14:07.140: >> Date: Sun, 18 May 2008 00:14:07 +0100 (GMT Daylight Time)<cr><lf>
00:14:07.140: << Date: BAD Unrecognized or out-of-state command.<cr><lf>
00:14:07.140: >> Subject: Read: Test<cr><lf>
00:14:07.140: << Subject: BAD Unrecognized or out-of-state command.<cr><lf>
00:14:07.140: >> From: "Test User" <test@xxxx.com><cr><lf>
00:14:07.140: << From: BAD Unrecognized or out-of-state command.<cr><lf>
00:14:07.140: >> To: test@xxxx.com<cr><lf>
00:14:07.140: << To: BAD Unrecognized or out-of-state command.<cr><lf>
00:14:07.140: >> User-Agent: SquirrelMail/1.4.15-rc1<cr><lf>
00:14:07.140: << User-Agent: BAD Unrecognized or out-of-state command.<cr><lf>
00:14:07.140: >> MIME-Version: 1.0<cr><lf>
00:14:07.140: << MIME-Version: BAD Unrecognized or out-of-state command.<cr><lf>
00:14:07.140: >> Content-Type: multipart/report;report-type=disposition-notification;<cr><lf>
00:14:07.140: << Content-Type: BAD Unrecognized or out-of-state command.<cr><lf>
00:14:07.140: >> charset=iso-8859-15;boundary="----=_20080518001407_51747"<cr><lf>
00:14:07.140: << charset=iso-8859-15;boundary="----=_20080518001407_51747" BAD Unrecognized or out-of-state command.<cr><lf>
00:14:07.140: >> X-Priority: 3 (Normal)<cr><lf>
00:14:07.140: << X-Priority: BAD Unrecognized or out-of-state command.<cr><lf>
00:14:07.140: >> Importance: Normal<cr><lf>
00:14:07.140: << Importance: BAD Unrecognized or out-of-state command.<cr><lf>
00:14:07.140: >> <cr><lf>
00:14:07.140: << * BAD Malformed command or oversize literal.<cr><lf>
00:14:07.140: >> ------=_20080518001407_51747<cr><lf>
00:14:07.140: << * BAD Malformed command or oversize literal.<cr><lf>
00:14:07.140: >> Content-Type: text/plain; charset="iso-8859-15"<cr><lf>
00:14:07.140: << Content-Type: BAD Unrecognized or out-of-state command.<cr><lf>
00:14:07.140: >> Content-Transfer-Encoding: us-ascii<cr><lf>
00:14:07.140: << Content-Transfer-Encoding: BAD Unrecognized or out-of-state command.<cr><lf>
00:14:07.140: >> <cr><lf>
00:14:07.140: << * BAD Malformed command or oversize literal.<cr><lf>
00:14:07.140: >> Your message<cr><lf>
00:14:07.140: << Your BAD Unrecognized or out-of-state command.<cr><lf>
00:14:07.140: >> <cr><lf>
00:14:07.140: << * BAD Malformed command or oversize literal.<cr><lf>
00:14:07.140: >> To: testuser@xxxx.com<cr><lf>
00:14:07.140: << To: BAD Unrecognized or out-of-state command.<cr><lf>
00:14:07.140: >> Subject: Test<cr><lf>
00:14:07.140: << Subject: BAD Unrecognized or out-of-state command.<cr><lf>
00:14:07.140: >> Sent: Sat, May 17, 2008 22:52<cr><lf>
00:14:07.140: << Sent: BAD Unrecognized or out-of-state command.<cr><lf>
00:14:07.140: >> <cr><lf>
00:14:07.140: << * BAD Malformed command or oversize literal.<cr><lf>
00:14:07.140: >> Was displayed on Sun, May 18, 2008 00:14<cr><lf>
00:14:07.140: << Was BAD Unrecognized or out-of-state command.<cr><lf>
00:14:07.140: >> ------=_20080518001407_51747<cr><lf>
00:14:07.140: << * BAD Malformed command or oversize literal.<cr><lf>
00:14:07.140: >> Content-Type: message/disposition-notification<cr><lf>
00:14:07.140: << Content-Type: BAD Unrecognized or out-of-state command.<cr><lf>
00:14:07.140: >> Content-Transfer-Encoding: us-ascii<cr><lf>
00:14:07.140: << Content-Transfer-Encoding: BAD Unrecognized or out-of-state command.<cr><lf>
00:14:07.140: >> <cr><lf>
00:14:07.140: << * BAD Malformed command or oversize literal.<cr><lf>
00:14:07.140: >> Reporting-UA : webmail.local ; SquirrelMail (version 1.4.15-rc1) <cr><lf>
00:14:07.140: << Reporting-UA BAD Unrecognized or out-of-state command.<cr><lf>
00:14:07.140: >> Original-Recipient : testuser@xxxx.com<cr><lf>
00:14:07.140: << Original-Recipient BAD Unrecognized or out-of-state command.<cr><lf>
00:14:07.140: >> Final-Recipient: rfc822; test@xxxx.com<cr><lf>
00:14:07.140: << Final-Recipient: BAD Unrecognized or out-of-state command.<cr><lf>
00:14:07.140: >> Original-Message-ID : <10.10.10.1.1211061179.squirrel@webmail.local><cr><lf>
00:14:07.140: << Original-Message-ID BAD Unrecognized or out-of-state command.<cr><lf>
00:14:07.140: >> Disposition: manual-action/MDN-sent-manually; displayed<cr><lf>
00:14:07.140: << Disposition: BAD Unrecognized or out-of-state command.<cr><lf>
00:14:07.140: >> ------=_20080518001407_51747--<cr><lf>
00:14:07.140: << * BAD Malformed command or oversize literal.<cr><lf>
00:14:07.140: >> <cr><lf>
00:14:07.140: << * BAD Malformed command or oversize literal.<cr><lf>
00:14:07.140: 9: Socket write error 10054 (connection aborted by remote host)
00:14:07.140: >> <cr><lf>
00:14:07.140: << * BAD Malformed command or oversize literal.<cr><lf>
00:14:07.140: 9: Socket write error 10054 (connection aborted by remote host)
00:14:07.140: 7: Socket read error 10054 (connection aborted by remote host)
00:14:07.140: --- Connection closed normally at Sun May 18 00:14:07 2008. ---
00:14:07.140:
<p>Here's a copy of my Mercury IMAP log when the error happens..</p><p>Any ideas ??</p><p>00:14:07.078: Connection from 10.10.10.2, Sun May 18 00:14:07 2008&lt;lf&gt;
00:14:07.093: &lt;&lt; * OK xxxx.com IMAP4rev1 Mercury/32 v4.52 server ready.&lt;cr&gt;&lt;lf&gt;
00:14:07.093: &gt;&gt; A001 LOGIN "testuser" "xxxxxx"&lt;cr&gt;&lt;lf&gt;
00:14:07.093: &lt;&lt; A001 OK LOGIN completed.&lt;cr&gt;&lt;lf&gt;
00:14:07.093: &gt;&gt; A002 SELECT "INBOX"&lt;cr&gt;&lt;lf&gt;
00:14:07.109: &lt;&lt; * 135 EXISTS&lt;cr&gt;&lt;lf&gt;
00:14:07.109: &lt;&lt; * 0 RECENT&lt;cr&gt;&lt;lf&gt;
00:14:07.109: &lt;&lt; * FLAGS (\Deleted \Draft \Seen \Answered)&lt;cr&gt;&lt;lf&gt;
00:14:07.109: &lt;&lt; * OK [UIDVALIDITY 1095969924] UID Validity&lt;cr&gt;&lt;lf&gt;
00:14:07.109: &lt;&lt; * OK [UIDNEXT 31024] Predicted next UID&lt;cr&gt;&lt;lf&gt;
00:14:07.109: &lt;&lt; * OK [PERMANENTFLAGS (\Deleted \Draft \Seen \Answered)] Settable message flags&lt;cr&gt;&lt;lf&gt;
00:14:07.109: &lt;&lt; A002 OK [READ-WRITE] SELECT completed.&lt;cr&gt;&lt;lf&gt;
00:14:07.109: &gt;&gt; A003 EXPUNGE&lt;cr&gt;&lt;lf&gt;
00:14:07.109: &lt;&lt; A003 OK EXPUNGE complete.&lt;cr&gt;&lt;lf&gt;
00:14:07.125: &gt;&gt; A004 LIST "" "INBOX.Sent"&lt;cr&gt;&lt;lf&gt;
00:14:07.125: &lt;&lt; * LIST (\NoInferiors) "/" INBOX.Sent&lt;cr&gt;&lt;lf&gt;
00:14:07.125: &lt;&lt; A004 OK LIST completed.&lt;cr&gt;&lt;lf&gt;
00:14:07.125: &gt;&gt; A005 APPEND "" (\Seen) {1369}&lt;cr&gt;&lt;lf&gt;
00:14:07.125: &lt;&lt; A005 NO [TRYCREATE] No such folder.&lt;cr&gt;&lt;lf&gt;
00:14:07.140: &gt;&gt; Received: from 10.10.10.1 ([10.10.10.1])&lt;cr&gt;&lt;lf&gt;
00:14:07.140: &lt;&lt; Received: BAD Unrecognized or out-of-state command.&lt;cr&gt;&lt;lf&gt;
00:14:07.140: &gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (SquirrelMail authenticated user testuser)&lt;cr&gt;&lt;lf&gt;
00:14:07.140: &lt;&lt; (SquirrelMail BAD Unrecognized or out-of-state command.&lt;cr&gt;&lt;lf&gt;
00:14:07.140: &gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; by webmail.local with HTTP;&lt;cr&gt;&lt;lf&gt;
00:14:07.140: &lt;&lt; by BAD Unrecognized or out-of-state command.&lt;cr&gt;&lt;lf&gt;
00:14:07.140: &gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Sun, 18 May 2008 00:14:07 +0100 (GMT Daylight Time)&lt;cr&gt;&lt;lf&gt;
00:14:07.140: &lt;&lt; Sun, BAD Unrecognized or out-of-state command.&lt;cr&gt;&lt;lf&gt;
00:14:07.140: &gt;&gt; Message-ID: &lt;4b67a831ce86f3509fa5a7ec586aab41.squirrel@webmail.local&gt;&lt;cr&gt;&lt;lf&gt;
00:14:07.140: &lt;&lt; Message-ID: BAD Unrecognized or out-of-state command.&lt;cr&gt;&lt;lf&gt;
00:14:07.140: &gt;&gt; Date: Sun, 18 May 2008 00:14:07 +0100 (GMT Daylight Time)&lt;cr&gt;&lt;lf&gt;
00:14:07.140: &lt;&lt; Date: BAD Unrecognized or out-of-state command.&lt;cr&gt;&lt;lf&gt;
00:14:07.140: &gt;&gt; Subject: Read: Test&lt;cr&gt;&lt;lf&gt;
00:14:07.140: &lt;&lt; Subject: BAD Unrecognized or out-of-state command.&lt;cr&gt;&lt;lf&gt;
00:14:07.140: &gt;&gt; From: "Test User" &lt;test@xxxx.com&gt;&lt;cr&gt;&lt;lf&gt;
00:14:07.140: &lt;&lt; From: BAD Unrecognized or out-of-state command.&lt;cr&gt;&lt;lf&gt;
00:14:07.140: &gt;&gt; To: test@xxxx.com&lt;cr&gt;&lt;lf&gt;
00:14:07.140: &lt;&lt; To: BAD Unrecognized or out-of-state command.&lt;cr&gt;&lt;lf&gt;
00:14:07.140: &gt;&gt; User-Agent: SquirrelMail/1.4.15-rc1&lt;cr&gt;&lt;lf&gt;
00:14:07.140: &lt;&lt; User-Agent: BAD Unrecognized or out-of-state command.&lt;cr&gt;&lt;lf&gt;
00:14:07.140: &gt;&gt; MIME-Version: 1.0&lt;cr&gt;&lt;lf&gt;
00:14:07.140: &lt;&lt; MIME-Version: BAD Unrecognized or out-of-state command.&lt;cr&gt;&lt;lf&gt;
00:14:07.140: &gt;&gt; Content-Type: multipart/report;report-type=disposition-notification;&lt;cr&gt;&lt;lf&gt;
00:14:07.140: &lt;&lt; Content-Type: BAD Unrecognized or out-of-state command.&lt;cr&gt;&lt;lf&gt;
00:14:07.140: &gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; charset=iso-8859-15;boundary="----=_20080518001407_51747"&lt;cr&gt;&lt;lf&gt;
00:14:07.140: &lt;&lt; charset=iso-8859-15;boundary="----=_20080518001407_51747" BAD Unrecognized or out-of-state command.&lt;cr&gt;&lt;lf&gt;
00:14:07.140: &gt;&gt; X-Priority: 3 (Normal)&lt;cr&gt;&lt;lf&gt;
00:14:07.140: &lt;&lt; X-Priority: BAD Unrecognized or out-of-state command.&lt;cr&gt;&lt;lf&gt;
00:14:07.140: &gt;&gt; Importance: Normal&lt;cr&gt;&lt;lf&gt;
00:14:07.140: &lt;&lt; Importance: BAD Unrecognized or out-of-state command.&lt;cr&gt;&lt;lf&gt;
00:14:07.140: &gt;&gt; &lt;cr&gt;&lt;lf&gt;
00:14:07.140: &lt;&lt; * BAD Malformed command or oversize literal.&lt;cr&gt;&lt;lf&gt;
00:14:07.140: &gt;&gt; ------=_20080518001407_51747&lt;cr&gt;&lt;lf&gt;
00:14:07.140: &lt;&lt; * BAD Malformed command or oversize literal.&lt;cr&gt;&lt;lf&gt;
00:14:07.140: &gt;&gt; Content-Type: text/plain; charset="iso-8859-15"&lt;cr&gt;&lt;lf&gt;
00:14:07.140: &lt;&lt; Content-Type: BAD Unrecognized or out-of-state command.&lt;cr&gt;&lt;lf&gt;
00:14:07.140: &gt;&gt; Content-Transfer-Encoding: us-ascii&lt;cr&gt;&lt;lf&gt;
00:14:07.140: &lt;&lt; Content-Transfer-Encoding: BAD Unrecognized or out-of-state command.&lt;cr&gt;&lt;lf&gt;
00:14:07.140: &gt;&gt; &lt;cr&gt;&lt;lf&gt;
00:14:07.140: &lt;&lt; * BAD Malformed command or oversize literal.&lt;cr&gt;&lt;lf&gt;
00:14:07.140: &gt;&gt; Your message&lt;cr&gt;&lt;lf&gt;
00:14:07.140: &lt;&lt; Your BAD Unrecognized or out-of-state command.&lt;cr&gt;&lt;lf&gt;
00:14:07.140: &gt;&gt; &lt;cr&gt;&lt;lf&gt;
00:14:07.140: &lt;&lt; * BAD Malformed command or oversize literal.&lt;cr&gt;&lt;lf&gt;
00:14:07.140: &gt;&gt; &nbsp;&nbsp;&nbsp; To:&nbsp; testuser@xxxx.com&lt;cr&gt;&lt;lf&gt;
00:14:07.140: &lt;&lt; To: BAD Unrecognized or out-of-state command.&lt;cr&gt;&lt;lf&gt;
00:14:07.140: &gt;&gt; &nbsp;&nbsp;&nbsp; Subject: Test&lt;cr&gt;&lt;lf&gt;
00:14:07.140: &lt;&lt; Subject: BAD Unrecognized or out-of-state command.&lt;cr&gt;&lt;lf&gt;
00:14:07.140: &gt;&gt; &nbsp;&nbsp;&nbsp; Sent: Sat, May 17, 2008 22:52&lt;cr&gt;&lt;lf&gt;
00:14:07.140: &lt;&lt; Sent: BAD Unrecognized or out-of-state command.&lt;cr&gt;&lt;lf&gt;
00:14:07.140: &gt;&gt; &lt;cr&gt;&lt;lf&gt;
00:14:07.140: &lt;&lt; * BAD Malformed command or oversize literal.&lt;cr&gt;&lt;lf&gt;
00:14:07.140: &gt;&gt; Was displayed on Sun, May 18, 2008 00:14&lt;cr&gt;&lt;lf&gt;
00:14:07.140: &lt;&lt; Was BAD Unrecognized or out-of-state command.&lt;cr&gt;&lt;lf&gt;
00:14:07.140: &gt;&gt; ------=_20080518001407_51747&lt;cr&gt;&lt;lf&gt;
00:14:07.140: &lt;&lt; * BAD Malformed command or oversize literal.&lt;cr&gt;&lt;lf&gt;
00:14:07.140: &gt;&gt; Content-Type: message/disposition-notification&lt;cr&gt;&lt;lf&gt;
00:14:07.140: &lt;&lt; Content-Type: BAD Unrecognized or out-of-state command.&lt;cr&gt;&lt;lf&gt;
00:14:07.140: &gt;&gt; Content-Transfer-Encoding: us-ascii&lt;cr&gt;&lt;lf&gt;
00:14:07.140: &lt;&lt; Content-Transfer-Encoding: BAD Unrecognized or out-of-state command.&lt;cr&gt;&lt;lf&gt;
00:14:07.140: &gt;&gt; &lt;cr&gt;&lt;lf&gt;
00:14:07.140: &lt;&lt; * BAD Malformed command or oversize literal.&lt;cr&gt;&lt;lf&gt;
00:14:07.140: &gt;&gt; Reporting-UA : webmail.local ; SquirrelMail (version 1.4.15-rc1) &lt;cr&gt;&lt;lf&gt;
00:14:07.140: &lt;&lt; Reporting-UA BAD Unrecognized or out-of-state command.&lt;cr&gt;&lt;lf&gt;
00:14:07.140: &gt;&gt; Original-Recipient :&nbsp; testuser@xxxx.com&lt;cr&gt;&lt;lf&gt;
00:14:07.140: &lt;&lt; Original-Recipient BAD Unrecognized or out-of-state command.&lt;cr&gt;&lt;lf&gt;
00:14:07.140: &gt;&gt; Final-Recipient: rfc822; test@xxxx.com&lt;cr&gt;&lt;lf&gt;
00:14:07.140: &lt;&lt; Final-Recipient: BAD Unrecognized or out-of-state command.&lt;cr&gt;&lt;lf&gt;
00:14:07.140: &gt;&gt; Original-Message-ID : &lt;10.10.10.1.1211061179.squirrel@webmail.local&gt;&lt;cr&gt;&lt;lf&gt;
00:14:07.140: &lt;&lt; Original-Message-ID BAD Unrecognized or out-of-state command.&lt;cr&gt;&lt;lf&gt;
00:14:07.140: &gt;&gt; Disposition: manual-action/MDN-sent-manually; displayed&lt;cr&gt;&lt;lf&gt;
00:14:07.140: &lt;&lt; Disposition: BAD Unrecognized or out-of-state command.&lt;cr&gt;&lt;lf&gt;
00:14:07.140: &gt;&gt; ------=_20080518001407_51747--&lt;cr&gt;&lt;lf&gt;
00:14:07.140: &lt;&lt; * BAD Malformed command or oversize literal.&lt;cr&gt;&lt;lf&gt;
00:14:07.140: &gt;&gt; &lt;cr&gt;&lt;lf&gt;
00:14:07.140: &lt;&lt; * BAD Malformed command or oversize literal.&lt;cr&gt;&lt;lf&gt;
00:14:07.140: 9: Socket write error 10054 (connection aborted by remote host)
00:14:07.140: &gt;&gt; &lt;cr&gt;&lt;lf&gt;
00:14:07.140: &lt;&lt; * BAD Malformed command or oversize literal.&lt;cr&gt;&lt;lf&gt;
00:14:07.140: 9: Socket write error 10054 (connection aborted by remote host)
00:14:07.140: 7: Socket read error 10054 (connection aborted by remote host)
00:14:07.140: --- Connection closed normally at Sun May 18 00:14:07 2008. ---
00:14:07.140:
</p>