6.0.0-beta1
7/17/25

[#14166] Error listing mailboxes
Summary Error listing mailboxes
Queue IMP
Queue Version 6.2.11
Type Bug
State Not A Bug
Priority 1. Low
Owners
Requester csoft2k5 (at) gmail (dot) com
Created 11/21/2015 (3526 days ago)
Due
Updated 01/25/2016 (3461 days ago)
Assigned 11/24/2015 (3523 days ago)
Resolved 01/25/2016 (3461 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch No

History
01/25/2016 04:20:03 PM Jan Schneider Comment #6 Reply to this comment
Oh, and since we're using SORT and not SEARCH, from the RFC's errata:

This also
    applies to any IMAP command or extension that includes a charset
    label and associated strings in the command arguments. Such
    extensions presently include SORT, THREAD and MULTISEARCH.
01/25/2016 04:18:18 PM Jan Schneider Comment #5
State ⇒ Not A Bug
Reply to this comment
From RFC 6855:

Once an IMAP client has enabled UTF-8 support with the "ENABLE
    UTF8=ACCEPT" command, it MUST NOT issue a "SEARCH" command that
    contains a charset specification.  If an IMAP server receives such a
    "SEARCH" command in that situation, it SHOULD reject the command with
    a "BAD" response (due to the conflicting charset labels).

Bottom line: your IMAP server is broken.
11/26/2015 03:59:37 PM csoft2k5 (at) gmail (dot) com Comment #4 Reply to this comment
Here's is an output from the log file with debug enabled:
Thu, 26 Nov 2015 17:56:32 +0200
Connection to: imap://localhost/
Server connection took 0,0006 seconds.
S: * OK [CAPABILITY IMAP4rev1 AUTH=CRAM-MD5 AUTH=PLAIN 
COMPRESS=DEFLATE ENABLE ID LITERAL+ SASL-IR STARTTLS]  Archiveopteryx 
IMAP Server
C: 1 [AUTHENTICATE response (username: sysadmin)]
S: + PEhDWjdjNzhRYWpsQ0JQWTNAbWFpbC5ha3oucm8+
C: c3lzYWRtaW4gMTM0NjNhODRhYjQ5ZDY3ZDEwZmU2NmE0MWMzYWQxM2Y=
S: 1 OK [CAPABILITY IMAP4rev1 ACL ANNOTATE-EXPERIMENT-1 BINARY 
CATENATE CHILDREN COMPRESS=DEFLATE CONDSTORE ENABLE ESEARCH 
I18NLEVEL=1 ID IDLE LIST-EXTENDED LITERAL+ MOVE MULTIAPPEND NAMESPACE 
QUOTA QRESYNC RIGHTS=ekntx SORT SORT=DISPLAY STARTTLS 
THREAD=ORDEREDSUBJECT THREAD=REFS THREAD=REFERENCES THRID UIDPLUS 
UNSELECT URLAUTH UTF8=ACCEPT WITHIN] done
Command 1 took 0,0058 seconds.
CACHE: Using the IMP_Imap_Cache_Wrapper storage driver.
C: 2 ENABLE QRESYNC UTF8=ACCEPT
C: 3 SELECT INBOX (QRESYNC (1 28 5,7:11))
S: * ENABLED UTF8=ACCEPT QRESYNC
S: 2 OK done
Command 2 took 0,002 seconds.
S: * FLAGS ($mdnsent \Answered \Deleted \Draft \Flagged \Seen)
S: * OK [PERMANENTFLAGS ($mdnsent \Answered \Deleted \Draft \Flagged 
\Seen \*)] permanent flags
S: * 8 EXISTS
S: * 0 RECENT
S: * OK [UIDNEXT 14] next uid
S: * OK [HIGHESTMODSEQ 28] next modseq - 1
S: * OK [UIDVALIDITY 1] uid validity
S: * OK [UNSEEN 7] first unseen
S: 3 OK [READ-WRITE] done
Command 3 took 0,0445 seconds.
C: 4 MYRIGHTS INBOX
S: * MYRIGHTS INBOX lrswipkxteancd
S: 4 OK done
Command 4 took 0,0023 seconds.
C: 5 UID SORT (SUBJECT) ALL
S: 5 NO [BADCHARSET big5 euc-jp euc-kr gb2312 gbk hp-roman8 ibm038 
ibm437 ibm775 ibm850 ibm852 ibm855 ibm857 ibm860 ibm861 ibm862 ibm863 
ibm864 ibm865 ibm866 ibm869 iso-2022-jp iso-8859-1 iso-8859-10 
iso-8859-13 iso-8859-14 iso-8859-15 iso-8859-16 iso-8859-2 iso-8859-3 
iso-8859-4 iso-8859-5 iso-8859-6 iso-8859-7 iso-8859-8 iso-8859-9 
koi8-r koi8-u "ks_c_5601-1987" macintosh "shift_jis" tis-620 
unknown-8bit us-ascii utf-16 utf-16be utf-16le utf-7 utf-8 
windows-1250 windows-1251 windows-1252 windows-1253 windows-1254 
windows-1255 windows-1256 windows-1257 windows-1258] Unknown character 
encoding: ALL
Command 5 took 0,002 seconds.
SEARCH: Retrieved search from cache 
(c95c5b383c5ae4cb27712d48f6c8860a [INBOX])
C: 6 GETQUOTAROOT INBOX
S: * QUOTAROOT INBOX ""
S: * QUOTA "" (STORAGE 1264 2147483647 MESSAGE 333  2147483647)
S: 6 OK done
Command 6 took 0,0042 seconds.
C: 7 LOGOUT
S: * OK [CLOSED] I, missa est
S: * BYE logout
S: 7 OK done
Command 7 took 0,0014 seconds.
11/24/2015 09:43:27 PM Jan Schneider Comment #3
State ⇒ Feedback
Reply to this comment
Probably a duplicate of bug #13149. An IMAP log would be helpful.

To further debug this issue, we need details of the IMP -> IMAP/POP 
communication.

To enable debugging, see instructions contained in 
imp/config/backends.php (the 'debug' config parameter).

Debugging should not be enabled on a production server,   Attach/post 
only the portion of the log that directly deals with the problem 
reported (it may be simplest to clear the log file and then perform 
the event that causes the error).
11/21/2015 12:40:16 PM csoft2k5 (at) gmail (dot) com Comment #2 Reply to this comment
The problem occurs only when I change the sort preferences on the mailbox.
After deleting the sort preference from the database, the messages are 
displayed.

11/21/2015 09:34:43 AM csoft2k5 (at) gmail (dot) com Comment #1
Priority ⇒ 1. Low
Type ⇒ Bug
Summary ⇒ Error listing mailboxes
Queue ⇒ IMP
Milestone ⇒
Patch ⇒ No
New Attachment: horde.png Download
State ⇒ Unconfirmed
Reply to this comment
Hi.
I'm using latest HGWE 5.2.11, on a PosgresSQL Database with 
Archiveopteryx as an IMAP server, on a CENTOS-7 Server with stock php 
version 5.4.16.
I have a lot of messages in INBOX that doesn't show up and getting the 
error in the attached file. Using other mail clients the messages are 
shown just fine.

Here is the output from the log file.

2015-11-21T11:25:55+02:00 NOTICE: HORDE [horde] User sysadmin logged 
out of Horde (10.80.1.14) [pid 18922 on line 107 of 
"/var/www/horde5/login.php"]
2015-11-21T11:26:00+02:00 NOTICE: HORDE [horde] Login success for 
sysadmin to horde (10.80.1.14) [pid 18922 on line 164 of 
"/var/www/horde5/login.php"]
2015-11-21T11:26:00+02:00 NOTICE: HORDE [imp] Login success for 
sysadmin (10.80.1.14) to {imap://localhost/} [pid 18922 on line 157 of 
"/var/www/horde5/imp/lib/Auth.php"]
2015-11-21T11:26:03+02:00 WARN: HORDE [imp] PHP ERROR: Invalid 
argument supplied for foreach() [pid 18922 on line 4805 of 
"/usr/share/pear/Horde/Imap/Client/Socket.php"]
2015-11-21T11:26:03+02:00 WARN: HORDE [imp] [search] Charset used in 
search query is not supported on the mail server. [pid 18922 on line 
730 of "/var/www/horde5/imp/lib/Imap.php"]

Saved Queries