[dovecot] Re: shared folders?

Timo Sirainen tss at iki.fi
Fri Apr 25 20:21:35 EEST 2003


On Fri, 2003-04-25 at 20:06, Moe Wibble wrote:
> > Well, I can't now think of why it wouldn't work :) At least as
> > read-write, read-only wouldn't work now.
> 
> Ah yes, I think that was the point where it failed when I tried.
> Very unfornationate because ro-access for some users to shared folders 
> where others can write is a must for us.

There's mostly just one problem with this. Mails in new/ couldn't be
accessed since they couldn't be moved to cur/ and their UID couldn't be
saved into uidlist file.

This is actually somewhat related to quota full situation when there's
no space to rewrite uidlist file.. Solution should be the same for both,
but I'm not sure yet what it is :)

> I'm really looking forward to "completed" sf-support in dovecot.

Courier-like shared maildir folders would probably be best way to do it.
It'd use symlinks to message files, so flags can still be changed
separately because it's only the user's symlink that gets renamed.

I wrote some kind of plan for shared folder + ACL support a few months
ago when there was a possibility of getting paid to do it: (anyone still
want to? :)

- Change maildir hierarchy separator from '.' to '/', so that usernames
could be used in mailboxes names without ugly mangling. 

- Namespace configuration:
   - namespace_[private|user|shared]_prefix
   - MAIL environment (or default_mail_env) additions:
      - USER_SHARED=.__my_shared_store__
      - SHARED=/somewhere for globally shared
   - NAMESPACE command

- Support for multiple namespaces
   - struct mail_storage == one namespace
   - fix all IMAP commands handling mailbox names to support other
mail_storages based on the mailbox name prefix

- mail_storage implementation for shared maildir folders
   - SUBSCRIBE shared/timo.sirainen/folder would create
.shared/timo.sirainen/folder/ and build indexes there
   - UNSUBSCRIBE would delete it
   - ..or should SELECT shared/user/folder work before being subscribed?
(Later at least yes, but that would need special handling)
   - LSUB could simply return all the folders in .shared/ dir
   - LIST could use user-defined plugins
       - getgroups() plugin
   - (Courier compatibility? It used some extra files)

- Separate per-mail symlinks to allow per-user mail flags
   - mostly just about syncing symlink directory with real directory

- ACL API design
   - Needs to support stackable implementations, so that eg. filesystem
ACL is at the bottom, on top of that an .aclrights file for more fine
grained non-OS forced ACLs.
   - compatible with ACL2 (currently draft), just a few issues

- Filesystem ACL implementation for the ACL API

- ACL IMAP commands

- Make existing commands play nicely with ACLs and shared folders
   - Say "permission denied" rather than "internal error" if some
syscall returns EACCES (mostly when opening folders)
   - When trying to expunge a message that wasn't ours, ignore or give
human readable error message (which one?), but don't give "internal
error"
   - In general Dovecot doesn't currently like having read-only access
to mailboxes
   - Ask ACL if operation is permitted before doing that, so it can
force the soft checks (.aclaccess file etc)




More information about the dovecot mailing list