WThe IMAP command “UID COPY” (to Trash) failed for the mailbox “INBOX” with server error: UID COPY Command is not valid in this state

Can't delete emails now

Mac Pro, macOS High Sierra (10.13)

Posted on Sep 27, 2017 6:13 AM

Reply
Question marked as Top-ranking reply

Posted on Sep 27, 2017 6:28 AM

Seen several reports on this including myself. Seems to be a problem with Yahoo accounts. Who is your provider?


To get mine working, I went to accounts in preferences and disabled the account, then re enabled it. This happened several times to me yesterday.

29 replies

Oct 5, 2017 8:56 AM in response to John Galt

Yahoo! finally took some of the blame for this, but Mail in High Sierra is a bit culpable as well.


In particular, Yahoo's IMAP servers can respond to an IMAP "CLOSE" command sent by Mail with the response:


    NO [SERVERBUG] CLOSE Server error - Please try again later


Unfortunately, that response to that command is illegal according to RFC 3501 - INTERNET MESSAGE ACCESS PROTOCOL - VERSION 4rev1. The CLOSE command is only allowed to return "OK" or "BAD," not "NO."


The High Sierra portion of the failure is that after that, Yahoo!'s IMAP server sends the response:


    BAD [CLIENTBUG] CLOSE Command is not valid in this state


to any future commands Mail sends until the response finally is seen as a command failure to Mail, which generates the error dialog box.


Instead, Apple Mail really needs to detect the error immediately (i.e. it needs to detect when an IMAP server has returned an illegalresponse to a command) and then needs to either report the failure or forcibly close and reopen the connection.


A workaround is to tell Mail to store Trash in the folder "On My Mac" rather than use the Trash folder on Yahoo!'s servers.

Sep 30, 2017 10:04 AM in response to r191

On-line chat with Apple support. They are aware of this problem which they say existed before high sierra but high sierra may have triggered this fault with those not previously affected. It is connected with Yahoo and ex Yahoo accounts and both Apple and Yahoo engineers are working on a fix!! Fingers crossed it will be sooner rather than later.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

WThe IMAP command “UID COPY” (to Trash) failed for the mailbox “INBOX” with server error: UID COPY Command is not valid in this state

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.