Please dis-consider the previous email.

Hello,

I use Roundcube as my main Webmail client and Dovecot as the underlying mail server.

Very often, users stumble across the error stated in the subject of this message:
 "Unable to send command: A0007 FETCH 1:* (UID BODY.PEEK[HEADER.FIELDS (FROM)])"".

After some research I have learned that this message itself is not where the problem lies, but it's the previous step, where it asks the IMAP server to sort the fetched headers by date:
 "A0006 UID SORT (DATE) US-ASCII ALL"

So the problem always happens when such mailbox is very large in number of messages. The IMAP server takes some time to process the sorting and Roundcube gives up waiting and times out.

After some efforts I have learned that Roundcube takes the following steps when opening a given mailbox:

A0001 CAPABILITY
A0002 LOGIN ****** 
A0003 STATUS INBOX (MESSAGES UNSEEN)
A0004 SELECT INBOX
A0005 UID SEARCH 27332
A0006 UID SORT (DATE) US-ASCII ALL

Is there something I can do in Roundcube to minimize this issue?

Regards,

Webert Lima
DevOps Engineer at MAV Tecnologia
Belo Horizonte - Brasil
IRC NICK - WebertRLZ