SOLVED Error in IMAP command UID SEARCH: Unknown argument

Luana Premoli

Well-Known Member
Oct 3, 2016
60
6
8
São Paulo/Brazil
cPanel Access Level
Root Administrator
Hi,

We have a customer who has 25,000 messages in the inbox of the email account.

When it tries to do any message search for the roundcube, the error is shown:

upload_2019-5-27_17-59-1.png

Log:


Code:
[27-May-2019 17:57:19 -0300]: <d8a23ced> [8720] S: * OK [CAPABILITY IMAP4rev1 SASL-IR LOGIN-REFERRALS ID ENABLE IDLE SORT SORT=DISPLAY THREAD=REFERENCES THREAD=REFS THREAD=ORDEREDSUBJECT MULTIAPPEND URL-PARTIAL CATENATE UNSELECT CHILDREN NAMESPACE UIDPLUS LIST-EXTENDED I18NLEVEL=1 CONDSTORE QRESYNC ESEARCH ESORT SEARCHRES WITHIN CONTEXT=SEARCH LIST-STATUS MOVE STARTTLS AUTH=PLAIN AUTH=LOGIN] Dovecot ready.
[27-May-2019 17:57:19 -0300]: <d8a23ced> [8720] C: A0001 ID ("name" "Roundcube" "version" "1.3.7" "php" "7.2.7" "os" "Linux" "command" "/cpsess9315782173/3rdparty/roundcube/index.php?_task=mail&_action=search&_filter=ALL&_interval=&_q=teste&_headers=*%2cINBOX.Sent%2cINBOX.Drafts%2cINBOX%2cINBOX.IMPORTANTES%2cINBOX.NIPPON%2cINBOX.Junk%2cINBOX.spam%2cINBOX.PLANO%20DE%20SAUDE%20SAO%20FRANCISCO%20INTEGRA%2cINBOX.ESCOLAS%20DOC%20AUDITORIA%2cINBOX.BORTOLANZA%20-CAARAPO%2cbody&_scope=base&_mbox=INBOX&_remote=1&_unlock=loading1558990639795&_=1558990607242")
[27-May-2019 17:57:19 -0300]: <d8a23ced> [8720] S: * ID ("name" "Dovecot")
[27-May-2019 17:57:19 -0300]: <d8a23ced> [8720] S: A0001 OK ID completed.
[27-May-2019 17:57:19 -0300]: <d8a23ced> [8720] C: A0002 AUTHENTICATE PLAIN ****** [141]
[27-May-2019 17:57:19 -0300]: <d8a23ced> [8720] S: A0002 OK [CAPABILITY IMAP4rev1 SASL-IR LOGIN-REFERRALS ID ENABLE IDLE SORT SORT=DISPLAY THREAD=REFERENCES THREAD=REFS THREAD=ORDEREDSUBJECT MULTIAPPEND URL-PARTIAL CATENATE UNSELECT CHILDREN NAMESPACE UIDPLUS LIST-EXTENDED I18NLEVEL=1 CONDSTORE QRESYNC ESEARCH ESORT SEARCHRES WITHIN CONTEXT=SEARCH LIST-STATUS MOVE] Logged in
[27-May-2019 17:57:19 -0300]: <d8a23ced> [8720] C: A0003 SELECT INBOX
[27-May-2019 17:57:19 -0300]: <d8a23ced> [8720] S: * FLAGS (\Answered \Flagged \Deleted \Seen \Draft unknown-0 unknown-1 $MDNSent)
[27-May-2019 17:57:19 -0300]: <d8a23ced> [8720] S: * OK [PERMANENTFLAGS (\Answered \Flagged \Deleted \Seen \Draft unknown-0 unknown-1 $MDNSent \*)] Flags permitted.
[27-May-2019 17:57:19 -0300]: <d8a23ced> [8720] S: * 25905 EXISTS
[27-May-2019 17:57:19 -0300]: <d8a23ced> [8720] S: * 0 RECENT
[27-May-2019 17:57:19 -0300]: <d8a23ced> [8720] S: * OK [UNSEEN 18458] First unseen.
[27-May-2019 17:57:19 -0300]: <d8a23ced> [8720] S: * OK [UIDVALIDITY 1558965499] UIDs valid
[27-May-2019 17:57:19 -0300]: <d8a23ced> [8720] S: * OK [UIDNEXT 26430] Predicted next UID
[27-May-2019 17:57:19 -0300]: <d8a23ced> [8720] S: A0003 OK [READ-WRITE] Select completed (0.003 + 0.000 + 0.002 secs).
[27-May-2019 17:57:19 -0300]: <d8a23ced> [8720] C: A0004 UID SORT (DATE) US-ASCII ALL OR OR OR OR OR OR OR OR OR OR OR HEADER * teste HEADER INBOX.SENT teste HEADER INBOX.DRAFTS teste HEADER INBOX teste HEADER INBOX.IMPORTANTES teste HEADER INBOX.NIPPON teste HEADER INBOX.JUNK teste HEADER INBOX.SPAM teste HEADER INBOX.PLANO DE SAUDE SAO FRANCISCO INTEGRA teste HEADER INBOX.ESCOLAS DOC AUDITORIA teste HEADER INBOX.BORTOLANZA -CAARAPO teste BODY teste
[27-May-2019 17:57:19 -0300]: <d8a23ced> [8720] S: A0004 BAD Error in IMAP command UID SORT: Unknown argument SAUDE (0.001 + 0.000 secs).
[27-May-2019 17:57:19 -0300]: <d8a23ced> [8720] C: A0005 UID SEARCH RETURN (ALL) OR OR OR OR OR OR OR OR OR OR OR HEADER * teste HEADER INBOX.SENT teste HEADER INBOX.DRAFTS teste HEADER INBOX teste HEADER INBOX.IMPORTANTES teste HEADER INBOX.NIPPON teste HEADER INBOX.JUNK teste HEADER INBOX.SPAM teste HEADER INBOX.PLANO DE SAUDE SAO FRANCISCO INTEGRA teste HEADER INBOX.ESCOLAS DOC AUDITORIA teste HEADER INBOX.BORTOLANZA -CAARAPO teste BODY teste
[27-May-2019 17:57:19 -0300]: <d8a23ced> [8720] S: A0005 BAD Error in IMAP command UID SEARCH: Unknown argument SAUDE (0.001 + 0.000 secs).
[27-May-2019 17:57:19 -0300]: <d8a23ced> [8720] C: A0006 LOGOUT
[27-May-2019 17:57:19 -0300]: <d8a23ced> [8720] S: * BYE Logging out
[27-May-2019 17:57:19 -0300]: <d8a23ced> [8720] S: A0006 OK Logout completed (0.001 + 0.000 secs).

The error is shown when the search occurs only inside the Inbox. Within other directories the search is performed normally and if it is selected for the search to occur within all folders, the result is also returned.

upload_2019-5-27_18-6-17.png


Server information:

Code:
[email protected] [tmp]# grep '' /usr/local/cpanel/version
11.78.0.24
[email protected] [tmp]# grep '' /var/cpanel/roundcube/version
1.3.7-2.cp1176
[email protected] [tmp]# grep roundcube_db /var/cpanel/cpanel.config
roundcube_db=sqlite
[email protected] [tmp]# /scripts/setupmailserver --current
Current mailserver type: dovecot
Current storage format: maildir or mdbox
[email protected] [tmp]#

Can help us?

Thanks
 

Attachments

Luana Premoli

Well-Known Member
Oct 3, 2016
60
6
8
São Paulo/Brazil
cPanel Access Level
Root Administrator
Hi,

Ticket response that solved the problem:



Reviewing resources on our end, it's been noticed in the past to likely be caused by corrupted Roundcube user preferences, specifically in the search_mods array, which stores the selected search options for each folder (To, From, Subject, etc.). Some folder names or other bad search options may be stored as search preferences for a specific folder, resulting in the error occurring only when searching that folder.

The suggestion is to clear the preferences which should return the normal functionality.

I'd run the following command to attempt to fix this.

Code:
sqlite3 /home/example/etc/example.com.br/dp1.rcube.db 'UPDATE users SET preferences = "" WHERE username = "[email protected]"'