Willie Gillespie
2010-Nov-22 19:22 UTC
[Dovecot] "list" ACL privilege ignored for LSUB command?
Hello, I am new to this list, so feel free to correct me if I do something wrong. I don't have a problem, just a question. The RFC which covers IMAP ACLs [1] states that one of the standard rights is: l - lookup (mailbox is visible to LIST/LSUB commands, SUBSCRIBE mailbox) If I have a shared or public namespace and have a mailbox for which I do not have lookup rights, Dovecot seems to do great with the LIST commands at not showing it to me. Two things I noticed though: SUBSCRIBE-ing to the mailbox is still successful LSUB will list mailboxes which I do not have lookup rights to I imagine the first issue is easy enough to correct since it's just another check before actually subscribing. The second issue seems a little more difficult in my mind since Dovecot seems to just dump the subscription files to the client without checking whether the mailbox is allowed or not. I imagine a similar issue popped up with the LIST command and that's why the dovecot-acl-list files exist. Anyway, am I right in my observations, or am I completely overlooking something obvious? Thanks! Willie [1] http://tools.ietf.org/html/rfc4314#section-2.1 Dovecot's wiki also indicates support for this in http://wiki1.dovecot.org/ACL#ACL_files I'm using version 1.2.9 with the acl and imap_acl mail_plugins in case that matters.
Timo Sirainen
2010-Nov-22 19:39 UTC
[Dovecot] "list" ACL privilege ignored for LSUB command?
On Mon, 2010-11-22 at 12:22 -0700, Willie Gillespie wrote:> Hello, I am new to this list, so feel free to correct me if I do > something wrong. I don't have a problem, just a question. > > The RFC which covers IMAP ACLs [1] states that one of the standard > rights is: > l - lookup (mailbox is visible to LIST/LSUB commands, SUBSCRIBE > mailbox) > > If I have a shared or public namespace and have a mailbox for which I do > not have lookup rights, Dovecot seems to do great with the LIST commands > at not showing it to me. > > Two things I noticed though: > SUBSCRIBE-ing to the mailbox is still successfulHmm. I kind of disagree with the RFC there.. If you have 'r' rights to the mailbox, you can select it. You know that it exists then. Why couldn't you be able to subscribe to it? It even makes sense to me that if there are mailboxes that +r-l that user should be able to subscribe to them to make it easier to access them.> LSUB will list mailboxes which I do not have lookup rights toThis is intentional. If you have ever subscribed to a mailbox, it's in your subscriptions list and it won't go away until UNSUBSCRIBE. It doesn't matter if the mailbox is deleted or its ACLs change. But, yes, I should restrict the SUBSCRIBE more. Currently it's possible to subscribe as long as there is any rights to the mailbox. (But if there are no rights, it's not possible to subscribe, so I don't really consider this a security hole.) I should probably change it to "l" or "r". I'll anyway ask what other IMAP people think about this.
Reasonably Related Threads
- 2.1: virtual plugin and lsub
- Help - I keep getting LSUB permission denied
- LSUB and subscribed folders
- unexpected LSUB / LIST (SUBSCRIBED) output Re: Panic: file mailbox-list-subscriptions.c: line 66 (mailbox_list_subscription_fill_one): assertion failed: (ns!= NULL && (ns->flags & NAMESPACE_FLAG_AUTOCREATED) != 0)
- LSUB "" "" vs LIST "" "" (hacked Apple Mail problem)