On Sun, 2008-11-16 at 05:09 +0200, Timo Sirainen wrote:
BTW. Listing shared mailboxes still doesn't work. I guess we'll see tomorrow if I still have energy to get that done.
Initial implementation done. It still could use optimizations though. Also it may incorrectly list users who look like they'd have mailboxes shared to us but don't actually.
It uses a dictionary. I tested with a file base dict, but it should work with SQL and Berkeley DB too. It creates entries like:
shared/shared-boxes/user/plop/tss 1 shared/shared-boxes/user/tss/tss 1 shared/shared-boxes/group/bar/tss 1 shared/shared-boxes/group/foo/tss 1 shared/shared-boxes/group/foo/someone 1
The above means that user "tss" has shared mailboxes to groups "foo" and "bar" and to user "plop". Also user "someone" has shared mailboxes to group "foo". So to find out whose mailboxes we (may) have access to we'll iterate through:
- .../anyone/
- .../user/<my username>/
- .../group/<my group #1>/
- .../group/<my group #2>/
- etc.
The initial scan is done when a LIST command is supposed to list shared mailboxes (so clients using only subscriptions can avoid this entirely). The results are cached for an hour, after that does another scan to see if there are new visible users.