Summary | Doesn't show unsubscribed folders |
Queue | IMP |
Queue Version | 6.2.1 |
Type | Bug |
State | Not A Bug |
Priority | 2. Medium |
Owners | |
Requester | frank.richter (at) hrz (dot) tu-chemnitz (dot) de |
Created | 08/13/2014 (3956 days ago) |
Due | |
Updated | 08/24/2014 (3945 days ago) |
Assigned | |
Resolved | 08/24/2014 (3945 days ago) |
Github Issue Link | |
Github Pull Request | |
Milestone | |
Patch | No |
State ⇒ Not A Bug
simple LIST commands,
and shows all folders. So this workaround works.
'capability_ignore' => array('LIST-EXTENDED')
to the cyrus config in backends.local.php. Obviously, it makes more
sense to do this from the Cyrus side since this will fix this issue on
ALL clients connecting to the server, rather than just IMP.
bug in IMP,
This can't be done automagically in the driver because there is no way
of determining that the server is actually broken based on the
response. IMAP version sniffing is not an option either. (Other
broken IMAP servers/commands can be detected because they do things
like send obviously incorrect information, or by sending the wrong
response. But absent not using LIST-EXTENDED for ANY server - which
is not going to happen - there's not much we can do about server
replies that are inaccurate.)
List all folders returning the Subscribed status.
given query (ignoring subscribed status) and provide information as
to which mailboxes are subscribed"
I got this answer from <brong@fastmail.fm> on info-cyrus mailing list:
Yes, it's a bug :( List code is hairy, and a couple of the edge
cases are wrong.
I recommend just turning off LIST-EXTENDED with:
suppress_capabilities: LIST-EXTENDED
See http://comments.gmane.org/gmane.mail.imap.cyrus/38001
With suppress_capabilities: LIST-EXTENDED IMP works with LSUB and
simple LIST commands,
and shows all folders. So this workaround works.
what IMP will issue when it is displaying ALL mailboxes. (Whether
cyrus is buggy is a separate issue.) If IMP is instead configured
to display only subscribed mailboxes, you should be seeing these
kind of queries instead:
C: 4 LIST "" INBOX RETURN (SUBSCRIBED)
C: 3 LIST (SUBSCRIBED) "" (INBOX.* user.* *) RETURN (SUBSCRIBED)
and cyrus-imapd replies correctly here.
My question was with subscribe = 0 -> Doesn't show unsubscribed folders
So, IMP is fine, cyrus-imapd in a murder environment is buggy.
Workaround for cyrus-imapd as described above
Question for you: Will you provide a workround for this cyrus-imapd
bug in IMP,
e.g. not asking
LIST () "" (INBOX INBOX.* user.* *) RETURN (SUBSCRIBED)
but intead just
LIST () "" (INBOX INBOX.* user.* *)
Thanks,
Frank
List all folders returning the Subscribed status.
given query (ignoring subscribed status) and provide information as to
which mailboxes are subscribed"
"List all folders returning the Subscribed status" would instead look
something like this:
C: 4 LIST (SUBSCRIBED) "" (INBOX INBOX.* user.* *)
- it is buggy.
buggy here!
IMP will issue when it is displaying ALL mailboxes. (Whether cyrus is
buggy is a separate issue.) If IMP is instead configured to display
only subscribed mailboxes, you should be seeing these kind of queries
instead:
C: 4 LIST "" INBOX RETURN (SUBSCRIBED)
C: 3 LIST (SUBSCRIBED) "" (INBOX.* user.* *) RETURN (SUBSCRIBED)
This tells the IMAP server to only return INBOX, subscribed mailboxes,
and provide flag information with each returned mailbox as to whether
the mailbox is subscribed or not.
So I am still concerned that there is something in your IMP
installation where internally it still thinks it is always displaying
all mailboxes, regardless of subscribed status. (Given your symptoms,
this is actually the expected behavior if that is the case). Which
begs the question: are you absolutely sure you don't have the
'subscribe' preference set to 0 for that user? IMP is really acting
like that is the case.
List all folders returning the Subscribed status.
But instead of this, the server returns ONLY subscribed folders.
It seems that Cyrus-imapd .2.4.17 - at least in my installation - is
buggy here!
Horde_Imap_Client_Base#listMailboxes() is either
'Horde_Imap_Client::MBOX_ALL_SUBSCRIBED' or
'Horde_Imap_Client::MBOX_UNSUBSCRIBED'.
/usr/share/pear/Horde/Imap/Client/Socket.php
switch ($mode) {
case Horde_Imap_Client::MBOX_ALL_SUBSCRIBED:
case Horde_Imap_Client::MBOX_UNSUBSCRIBED:
# $return_opts->add('SUBSCRIBED');
it shows all the folders ->
C: 3 LIST () "" (INBOX INBOX.* user.* *)
So maybe this would be a workaround for me.
includes the 'UNSUB' mask argument. This argument can only occur in
one of three situations that I can see:
1. Subscriptions are disabled (prefs 'subscribe' value)
Ok, I'll dig into Cyrus-imapd then ...
Thanks,
Frank
Horde_Imap_Client_Base#listMailboxes() is either
'Horde_Imap_Client::MBOX_ALL_SUBSCRIBED' or
'Horde_Imap_Client::MBOX_UNSUBSCRIBED'.
This can only happen if the argument to IMP_Ftree_Account_Imap
includes the 'UNSUB' mask argument. This argument can only occur in
one of three situations that I can see:
1. Subscriptions are disabled (prefs 'subscribe' value)
2. Session 'showunsub' variable is set (irrelevant here, since this
can only be set in basic or minimal views and we are talking about
dynamic view).
3. user does not have 'allow_folders' permission (not the issue here,
since this would only query INBOX).
See imp/lib/Ftree.php line 169.
In previous Horde/IMP versions that meant
Use IMAP mailbox subscriptions? - no
prefs.local.php file, make sure the user you are testing with does
not have that pref set in the prefs backend.
automatically set last_login, etc..).
In previous Horde/IMP versions that meant
Use IMAP mailbox subscriptions? - no
prefs.local.php file, make sure the user you are testing with does not
have that pref set in the prefs backend.
test case. I can't give you much more guidance than that since
everything works fine here.
C: 4 LIST () "" (INBOX INBOX.* user.* *) RETURN (SUBSCRIBED)
Horde asks only for *subscribed* folders, the server returns the list,
and Horde shows these folders.
BUT I have $_prefs['subscribe']['value'] = 0;
In previous Horde/IMP versions that meant
Use IMAP mailbox subscriptions? - no
How can I achieve that Horde5.2.X/IMP 6.2.X shows the full list of
folders, not just the subscribed?
Thanks,
Frank
test case. I can't give you much more guidance than that since
everything works fine here.
I can verify that everything works fine on separate Cyrus 2.2, 2.3,
and 2.4 installations.
2.2:
S: * OK bernard Cyrus IMAP4 v2.2.13-Debian-2.2.13-19+squeeze3 server ready
[snip]
C: 2 UNSUBSCRIBE INBOX.B
S: 2 OK Completed
[snip]
C: 2 LSUB "" INBOX
C: 3 LSUB "" INBOX.*
C: 4 LSUB "" user.*
C: 5 LSUB "" *
S: * LSUB (\Noselect \HasChildren) "." "INBOX"
S: 2 OK Completed (0.000 secs 2 calls)
S: 3 OK Completed (0.000 secs 2 calls)
S: 5 OK Completed (0.000 secs 2 calls)
C: 7 LIST "" INBOX.*
C: 8 LIST "" user.*
C: 9 LIST "" *
S: * LIST (\HasChildren) "." "INBOX"
S: 6 OK Completed (0.000 secs 4 calls)
S: * LIST (\HasNoChildren) "." "INBOX.B"
S: 7 OK Completed (0.000 secs 3 calls)
S: * LIST (\HasNoChildren) "." "INBOX.A"
S: * LIST (\HasNoChildren) "." "INBOX.B"
S: 9 OK Completed (0.000 secs 4 calls)
2.3:
S: * OK [CAPABILITY IMAP4 IMAP4rev1 LITERAL+ ID STARTTLS
COMPRESS=DEFLATE] centos.curecanti.org Cyrus IMAP
v2.3.16-Fedora-RPM-2.3.16-6.el6_2.5 server ready
[snip]
C: 2 UNSUBSCRIBE INBOX.A
S: 2 OK Completed
[snip]
C: 2 LSUB "" INBOX
C: 3 LSUB "" INBOX.*
C: 4 LSUB "" user.*
C: 5 LSUB "" *
S: * LSUB (\Noselect \HasChildren) "." "INBOX"
S: 2 OK Completed (0.000 secs 3 calls)
S: * LSUB () "." "INBOX.ABC"
S: 3 OK Completed (0.000 secs 3 calls)
S: * LSUB () "." "INBOX.ABC"
S: 5 OK Completed (0.000 secs 3 calls)
C: 7 LIST "" INBOX.*
C: 8 LIST "" user.*
C: 9 LIST "" *
S: * LIST (\HasChildren) "." "INBOX"
S: 6 OK Completed (0.000 secs 5 calls)
S: * LIST (\HasNoChildren) "." "INBOX.A"
S: * LIST (\HasNoChildren) "." "INBOX.ABC"
S: 7 OK Completed (0.000 secs 4 calls)
S: * LIST (\HasNoChildren) "." "INBOX.123"
S: * LIST (\HasNoChildren) "." "INBOX.A"
S: * LIST (\HasNoChildren) "." "INBOX.ABC"
S: 9 OK Completed (0.000 secs 5 calls)
S: * OK [CAPABILITY IMAP4rev1 LITERAL+ ID ENABLE AUTH=DIGEST-MD5
AUTH=CRAM-MD5 AUTH=NTLM AUTH=LOGIN AUTH=PLAIN SASL-IR] ruraljuror
Cyrus IMAP v2.4.16-Debian-2.4.16-4+deb7u2 server ready
[snip]
C: 3 UNSUBSCRIBE INBOX.BBB
S: 3 OK Completed
C: 4 LIST "" INBOX RETURN (SUBSCRIBED)
C: 3 LIST (SUBSCRIBED) "" (INBOX.* user.* *) RETURN (SUBSCRIBED)
S: * LIST (\Subscribed \HasChildren) "." INBOX (CHILDINFO (SUBSCRIBED))
S: 4 OK Completed (0.010 secs 23 calls)
S: * LIST (\Subscribed \HasChildren) "." INBOX.A.B
S: * LIST (\Subscribed) "." INBOX.A.B.C
S: * LIST (\Subscribed) "." INBOX.B.c
S: * LIST (\Subscribed) "." INBOX.C
S: * LIST (\Subscribed) "." INBOX.Trash
S: * LIST (\Subscribed \HasChildren) "." INBOX.A
S: * LIST (\Subscribed \HasChildren) "." INBOX.A.B
S: * LIST (\Subscribed) "." INBOX.A.B.C
S: * LIST (\Subscribed) "." INBOX.B.c
S: * LIST (\Subscribed) "." INBOX.C
S: * LIST (\Subscribed) "." INBOX.Trash
S: 3 OK Completed (0.000 secs 12 calls)
S: * LIST (\Subscribed \HasChildren) "." INBOX.A (CHILDINFO (SUBSCRIBED))
S: * LIST (\Subscribed \HasChildren) "." INBOX.A.B (CHILDINFO (SUBSCRIBED))
S: * LIST (\Subscribed \HasNoChildren) "." INBOX.A.B.C
S: * LIST (\Subscribed \HasNoChildren) "." INBOX.B.c
S: * LIST (\HasNoChildren) "." INBOX.BBB
S: * LIST (\Subscribed \HasNoChildren) "." INBOX.C
S: * LIST (\Subscribed) "." INBOX.Trash
S: * LIST (\HasChildren) "." INBOX (CHILDINFO (SUBSCRIBED))
S: * LIST (\Subscribed \HasChildren) "." INBOX.A (CHILDINFO (SUBSCRIBED))
S: * LIST (\Subscribed \HasChildren) "." INBOX.A.B (CHILDINFO (SUBSCRIBED))
S: * LIST (\Subscribed \HasNoChildren) "." INBOX.A.B.C
S: * LIST (\Subscribed \HasNoChildren) "." INBOX.B.c
S: * LIST (\HasNoChildren) "." INBOX.BBB
S: * LIST (\Subscribed \HasNoChildren) "." INBOX.C
S: * LIST (\Subscribed) "." INBOX.Trash
S: 5 OK Completed (0.000 secs 39 calls)
#13261Horde_Imap_Client 2.24.2 stable
What can I do to debug this?
State ⇒ Duplicate
#13261State ⇒ Unconfirmed
Patch ⇒ No
Milestone ⇒
Queue ⇒ IMP
Summary ⇒ Doesn't show unsubscribed folders
Type ⇒ Bug
Priority ⇒ 2. Medium
subscribed to, regardless the imp setting for 'subscribe'.
E.g. if I unsubscribe to INBOX, no INBOX is shown.
Server (Cyrus-imapd) logs:
<1407937338<3 LIST () "" (INBOX INBOX.* user.* *) RETURN (SUBSCRIBED)^M
It's a fresh new up-to-date installation:
Channel pear.horde.org: No upgrades available
Thanks,
Frank