Discussion:
[RCU] Unable to send command: A0007 FETCH 1:* (UID BODY.PEEK[HEADER.FIELDS (FROM)])"
Webert de Souza Lima
2018-03-27 14:27:23 UTC
Permalink
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"*

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


Regards,

Webert Lima
DevOps Engineer at MAV Tecnologia
*Belo Horizonte - Brasil*
*IRC NICK - WebertRLZ*
Webert de Souza Lima
2018-03-27 14:30:45 UTC
Permalink
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*
A.L.E.C
2018-03-27 14:33:56 UTC
Permalink
Post by Webert de Souza Lima
A0006 UID SORT (DATE) US-ASCII ALL
Is there something I can do in Roundcube to minimize this issue?
Set messages list sorting to "None" or "Arrival date".
--
Aleksander 'A.L.E.C' Machniak
Kolab Groupware Developer [http://kolab.org]
Roundcube Webmail Developer [http://roundcube.net]
----------------------------------------------------
PGP: 19359DC1 # Blog: https://kolabian.wordpress.com
Webert de Souza Lima
2018-03-27 16:52:07 UTC
Permalink
Hey A.L.E.C., thanks for hitting back.
You mean the filed *message_sort_col* in roundcube's settings file?

In the config/defaults.inc.php file it says:

// default messages sort column. Use empty value for default server's
sorting,
// or 'arrival', 'date', 'subject', 'from', 'to', 'fromto', 'size', 'cc'
$config['message_sort_col'] = '';

I've checked and in all my servers it is set to empty:

/var/www/config # grep -r message_sort_col .
./defaults.inc.php:$config['message_sort_col'] = '';

I tried changing it to 'None' as you suggested but it didn't take any
effect. Roundcube is still issuing the SORT command before FETCH.



Regards,

Webert Lima
DevOps Engineer at MAV Tecnologia
*Belo Horizonte - Brasil*
*IRC NICK - WebertRLZ*
Post by A.L.E.C
Post by Webert de Souza Lima
A0006 UID SORT (DATE) US-ASCII ALL
Is there something I can do in Roundcube to minimize this issue?
Set messages list sorting to "None" or "Arrival date".
--
Aleksander 'A.L.E.C' Machniak
Kolab Groupware Developer [http://kolab.org]
Roundcube Webmail Developer [http://roundcube.net]
----------------------------------------------------
PGP: 19359DC1 # Blog: https://kolabian.wordpress.com
_______________________________________________
Roundcube Users mailing list
http://lists.roundcube.net/mailman/listinfo/users
A.L.E.C
2018-03-27 17:08:11 UTC
Permalink
Post by Webert de Souza Lima
Hey A.L.E.C., thanks for hitting back.
You mean the filed *message_sort_col* in roundcube's settings file?
// default messages sort column. Use empty value for default server's sorting,
// or 'arrival', 'date', 'subject', 'from', 'to', 'fromto', 'size', 'cc'
$config['message_sort_col'] = '';                                          
 /var/www/config # grep -r message_sort_col .
./defaults.inc.php:$config['message_sort_col'] = '';
I tried changing it to 'None' as you suggested but it didn't take any effect. Roundcube is
still issuing the SORT command before FETCH.
Every user has this option already set in his preferences. So, either they go to messages
list options menu and change that "manually". Or you force that for all users using
dont_override setting.
--
Aleksander 'A.L.E.C' Machniak
Kolab Groupware Developer [http://kolab.org]
Roundcube Webmail Developer [http://roundcube.net]
----------------------------------------------------
PGP: 19359DC1 # Blog: https://kolabian.wordpress.com
Webert de Souza Lima
2018-03-27 17:50:12 UTC
Permalink
Ok it really worked with:

$config['dont_override'] = array('message_sort_col'); and
$config['message_sort_col'] = '';

but I hit the problem that a given user will never be able to change
sorting so that won't be enough.
I'll have to change all users preferences in DB and empty that field.

What I figure is happening is:
- default setting is empty
- the user click on the Date column just to change the sorting to ASC or
DESC
- the user's preference is set to sort by DATE
- the user will never have the default setting again

I can't imagine way to solve this. It will always happen.

Regards,

Webert Lima
DevOps Engineer at MAV Tecnologia
*Belo Horizonte - Brasil*
*IRC NICK - WebertRLZ*
Post by Webert de Souza Lima
Post by Webert de Souza Lima
Hey A.L.E.C., thanks for hitting back.
You mean the filed *message_sort_col* in roundcube's settings file?
// default messages sort column. Use empty value for default server's
sorting,
Post by Webert de Souza Lima
// or 'arrival', 'date', 'subject', 'from', 'to', 'fromto', 'size', 'cc'
$config['message_sort_col'] = '';
/var/www/config # grep -r message_sort_col .
./defaults.inc.php:$config['message_sort_col'] = '';
I tried changing it to 'None' as you suggested but it didn't take any
effect. Roundcube is
Post by Webert de Souza Lima
still issuing the SORT command before FETCH.
Every user has this option already set in his preferences. So, either they go to messages
list options menu and change that "manually". Or you force that for all users using
dont_override setting.
--
Aleksander 'A.L.E.C' Machniak
Kolab Groupware Developer [http://kolab.org]
Roundcube Webmail Developer [http://roundcube.net]
----------------------------------------------------
PGP: 19359DC1 # Blog: https://kolabian.wordpress.com
_______________________________________________
Roundcube Users mailing list
http://lists.roundcube.net/mailman/listinfo/users
Loading...