Re: [Dovecot] patch: list shared namespace

2008-11-19 Thread Timo Sirainen
All of this is now implemented. I think shared mailboxes/ACLs are now fully working. The only thing left is to avoid calling acl_lookup_dict_rebuild() after each ACL change, but rather just update the dict directly with the changes. Hmm. Wonder how quota behaves with shared mailboxes.. That's prob

Re: [Dovecot] patch: list shared namespace

2008-11-19 Thread Timo Sirainen
On Mon, 2008-11-03 at 13:03 +0100, Bernhard Herzog wrote: > > As you can see, the non-existing "foo.foo" isn't returned because its > > child "foo.foo.foo" also matches the pattern and is returned. But the > > non-existing "foo.bar" is returned because its children don't match the > > pattern. It t

Re: [Dovecot] patch: list shared namespace

2008-11-07 Thread Timo Sirainen
On Fri, 2008-10-31 at 17:33 +0200, Timo Sirainen wrote: > What I'm worrying here is if all users have shared something. For > example how does this work with global ACLs? IIRC if there's a global > ACL for e.g. "Spam", Dovecot will create dovecot-acl-list with "Spam" in > it for all users. Even wit

Re: [Dovecot] patch: list shared namespace

2008-11-04 Thread Timo Sirainen
On Nov 4, 2008, at 8:38 PM, Bernhard Herzog wrote: On 31.10.2008, Timo Sirainen wrote: On Tue, 2008-10-28 at 21:07 +0100, Bernhard Herzog wrote: I'm not sure the new hook is really needed. The patch could perhaps just as well extend the acl_next_hook_mail_storage_created and acl_next_hook_mai

Re: [Dovecot] patch: list shared namespace

2008-11-04 Thread Bernhard Herzog
On 31.10.2008, Timo Sirainen wrote: > On Tue, 2008-10-28 at 21:07 +0100, Bernhard Herzog wrote: > > I'm not sure the new hook is really needed. The patch could perhaps > > just as well extend the acl_next_hook_mail_storage_created and > > acl_next_hook_mailbox_list_created functions to do the name

Re: [Dovecot] patch: list shared namespace

2008-11-04 Thread Bernhard Herzog
On 31.10.2008, Timo Sirainen wrote: > v1.2 code supports multiple users per process. That means you can't > really use getenv("USER") and you can't store per-user objects as static > variables. Rather you should hook into hook_mail_user_created and add > the per-user variables to the mail_user stru

Re: [Dovecot] patch: list shared namespace

2008-11-03 Thread Bernhard Herzog
On 01.11.2008, Timo Sirainen wrote: > On Fri, 2008-10-31 at 17:51 +0200, Timo Sirainen wrote: > > LIST % -> List "foo" as non-existing > > LIST foo -> List "foo" as non-existing > > LIST * -> List "foo/bar" only > > There are also some truly horrible cases. I tested this with my acl_mailbox_list_i

Re: [Dovecot] patch: list shared namespace

2008-11-01 Thread Timo Sirainen
On Fri, 2008-10-31 at 17:51 +0200, Timo Sirainen wrote: > LIST % -> List "foo" as non-existing > LIST foo -> List "foo" as non-existing > LIST * -> List "foo/bar" only There are also some truly horrible cases. For example: 1 list "" foo* * LIST (\HasNoChildren) "." "foo.foo.foo" * LIST (\HasNoChi

Re: [Dovecot] patch: list shared namespace

2008-10-31 Thread Timo Sirainen
On Oct 31, 2008, at 10:03 PM, Bernhard Herzog wrote: On 31.10.2008, Timo Sirainen wrote: Right, it could (would) cause mailboxes to be listed that aren't supposed to be listed. I think you'll also have a problem if e.g. "foo" exists but doesn't have 'l' right and "foo/bar" exists and has 'l'

Re: [Dovecot] patch: list shared namespace

2008-10-31 Thread Bernhard Herzog
On 31.10.2008, Timo Sirainen wrote: > Right, it could (would) cause mailboxes to be listed that aren't > supposed to be listed. I think you'll also have a problem if e.g. "foo" > exists but doesn't have 'l' right and "foo/bar" exists and has 'l' > right. I think % will currently not list "foo". If

Re: [Dovecot] patch: list shared namespace

2008-10-31 Thread Timo Sirainen
On Oct 31, 2008, at 9:42 PM, Bernhard Herzog wrote: The behavior of the _verify funtion is the problem. It only rebuilds if any of the already referenced acl files has changed but not if new acl files have been created. I'm not sure yet what the best way is to determine whether new mailb

Re: [Dovecot] patch: list shared namespace

2008-10-31 Thread Bernhard Herzog
On 28.10.2008, Bernhard Herzog wrote: > - The dovecot-acl-list is not always rebuilt, even when it should have >been, AFAICT. In particular, if the file exists but is empty, it's >never updated, even when ACL later change. Maybe this is a bug in >the Kolab branch. It happens with va

Re: [Dovecot] patch: list shared namespace

2008-10-31 Thread Timo Sirainen
On Fri, 2008-10-31 at 12:52 +0100, Bernhard Herzog wrote: > On 28.10.2008, Bernhard Herzog wrote: > > - List with "%" doesn't list all intermediate mailboxes. > > > >On the one hand arthur sees this: > > > > x LIST "" "*" > > ... > > * LIST (\Noselect \HasChildren) "/" "users/fo

Re: [Dovecot] patch: list shared namespace

2008-10-31 Thread Timo Sirainen
On Tue, 2008-10-28 at 21:07 +0100, Bernhard Herzog wrote: > One of the main problems the patch addresses is getting a list of all > users that have mailboxes the logged in user can see. The patch uses a > dict to cache information about which users have at least one mailbox > that is visible to ot

Re: [Dovecot] patch: list shared namespace

2008-10-31 Thread Bernhard Herzog
On 28.10.2008, Bernhard Herzog wrote: > - List with "%" doesn't list all intermediate mailboxes. > >On the one hand arthur sees this: > > x LIST "" "*" > ... > * LIST (\Noselect \HasChildren) "/" "users/ford" > * LIST (\HasNoChildren) "/" "users/ford/INBOX/hhgttg" > x

Re: [Dovecot] patch: list shared namespace

2008-10-29 Thread Bernhard Herzog
On 28.10.2008, Bernhard Herzog wrote: > I've been working on a patch for dovecot 1.2 from the Kolab branch > (http://hg.intevation.org/kolab/dovecot-1.2_kolab-branch/) that > implements listing of shared namespaces. I've got something that works > in some basic way but is still missing some pieces

[Dovecot] patch: list shared namespace

2008-10-28 Thread Bernhard Herzog
Hi, I've been working on a patch for dovecot 1.2 from the Kolab branch (http://hg.intevation.org/kolab/dovecot-1.2_kolab-branch/) that implements listing of shared namespaces. I've got something that works in some basic way but is still missing some pieces. See the attached patch, which also con