Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

list/subscribe shared folders with courier-imap #3767

Closed
rcubetrac opened this issue May 9, 2012 · 5 comments

Comments

Projects
None yet
1 participant
@rcubetrac
Copy link

commented May 9, 2012

Reported by simeon ott on 9 May 2012 12:15 UTC as Trac ticket #1488466

If using Courier as IMAP-Backend, Roundcube does not list real or virtual shared folders because of slightly different implemented LIST command and namespace handling (see http://www.courier-mta.org/imap/tutorial.setup.html).

with imap_ns_* flags set to null, RC correctly discovers the other namespaces ..

[12:12:08 +0200](09-May-2012): [C: A0002 NAMESPACE
[09-May-2012 12:12:08 +0200](69BC]): [S: * NAMESPACE (("INBOX." ".")) NIL (("#shared." ".")("shared." "."))

.. but listing mailboxes with the commands ..

[09-May-2012 12:03:13 +0200](69BC]): [S: A0002 OK LIST completed
[09-May-2012 12:03:13 +0200](C589]): [C: A0003 LIST #shared. "*"
[09-May-2012 12:03:13 +0200](C589]): [S: A0003 OK LIST completed
[09-May-2012 12:03:13 +0200](C589]): [C: A0004 LIST shared. "*"
[09-May-2012 12:03:13 +0200](C589]): [C589] S: A0004 OK LIST completed

.. does not return any shared folders assigned to the user. The "correct" syntax for courier-imap would be ..

. NAMESPACE
* NAMESPACE (("INBOX." ".")) NIL (("#shared." ".")("shared." "."))
. OK NAMESPACE completed.
. LIST "" "#shared.*"
* LIST (\HasNoChildren) "." "#shared.testaccount.sharedfolder1"
* LIST (\Noselect \HasChildren) "." "#shared.testaccount"
. OK LIST completed

The prefix and the name of the mailbox are joined together as the second argument. The head developer of courier-imap argues about this behavior because of a always changing RFC even if it's declared as the same protocol (rev1) (http://www.courier-mta.org/fud/).

Because this behavior of Courier-IMAP is not going to be changed in the near future (as it's been a long discussed story over years) it would be great having a workaround in RC itself.

A quick fix for courier-imap to just list the folders in the settings/folder view would be:

in the file program/include/rcube_imap.php, function _list_unsubscribed

< $list = $this->conn->listMailboxes($prefix, $name);
> $list = $this->conn->listMailboxes('.', $prefix.$name);

but this won't help in showing any folders outside the personal namespace in the mailbox view.

Migrated-From: http://trac.roundcube.net/ticket/1488466

@rcubetrac

This comment has been minimized.

Copy link
Author

commented May 9, 2012

Milestone changed by @alecpl on 9 May 2012 12:59 UTC

later => 0.8-rc

@rcubetrac

This comment has been minimized.

Copy link
Author

commented May 14, 2012

Comment by @alecpl on 14 May 2012 17:58 UTC

Here's a proposed solution 0af82c8

@rcubetrac

This comment has been minimized.

Copy link
Author

commented May 19, 2012

Comment by simeon ott on 19 May 2012 12:16 UTC

the provided patched version works on my courier installation so far. thanks a lot for your help

@rcubetrac

This comment has been minimized.

Copy link
Author

commented May 21, 2012

Comment by @alecpl on 21 May 2012 16:08 UTC

I've made this optional (imap_force_ns option) and merged into master and release-0.8 branches.

@rcubetrac

This comment has been minimized.

Copy link
Author

commented May 21, 2012

Status changed by @alecpl on 21 May 2012 16:08 UTC

new => closed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.