[Dovecot] Shared maildir through namespace help...
Hi,
I'm a happy user of dovecot since the 0.99.x days, and recently switched my user base to 1.0b2.
Now, to the point, I got a request (from marketing) to share a lot of maildirs between two (and possibly more) accounts. Those two accounts have differents uid/gid. The maildirs are actually in one of the account.
I thought I could possibly craft a public namespace for those maildirs as explained in the wiki, but alas, it doesn't quite work as I expected:
excerpt of dovecot.conf: namespace public { separator = / prefix = marketing/ location = maildir:/home/marketing/Maildir:INDEX=%h/ }
users belong to the marketing group.
$ find /home/marketing/Maildir -ls 4767751 4 drwxrwxr-x 3 marketing marketing 4096 Mar 14 11:57 . 4767752 4 drwxrwsr-x 6 marketing marketing 4096 Mar 14 11:59 ./Maildir 4767753 4 drwxrwsr-x 2 marketing marketing 4096 Mar 14 11:57 ./Maildir/cur 4767754 4 drwxrwsr-x 2 marketing marketing 4096 Mar 14 11:57 ./Maildir/tmp 4767755 4 drwxrwsr-x 2 marketing marketing 4096 Mar 14 11:57 ./Maildir/new 4767756 0 -rw-r--r-- 1 marketing marketing 0 Mar 14 11:57 ./Maildir/dovecot-shared
From there, the namespace is visible from all the IMAP accounts. Now, if a user creates a new folder in this public namespace, here is what I get: 4767757 4 drwx--S--- 5 brice marketing 4096 Mar 14 12:05 ./Maildir/.test 4767758 4 drwx--S--- 2 brice marketing 4096 Mar 14 11:59 ./Maildir/.test/cur 4767759 4 drwx--S--- 2 brice marketing 4096 Mar 14 11:59 ./Maildir/.test/new 4767760 4 drwx--S--- 2 brice marketing 4096 Mar 14 11:59 ./Maildir/.test/tmp 4767761 0 -rw-r--r-- 1 brice marketing 0 Mar 14 11:59 ./Maildir/.test/dovecot-shared 4767762 4 -rw------- 1 brice marketing 6 Mar 14 11:59 ./Maildir/subscriptions
As you can see: the cur,new,tmp dir don't have the right permissions (they're not rw for the group), and moreover, the 'subscriptions' file has the same problem.
The result is that any other user don't have access to this directory even if it is in a public namespace.
Now, the question, is: is that setup could work only with virtual users setup with a static uid/gid ?
Is there a mean to implement what I want ? Does using symlinks instead of the namespace could work ?
Regards,
Brice Figureau brice+dovecot@daysofwonder.com
On Tue, March 14, 2006 12:13, Brice Figureau wrote:
Now, to the point, I got a request (from marketing) to share a lot of maildirs between two (and possibly more) accounts. Those two accounts have differents uid/gid. The maildirs are actually in one of the account.
Why not just create a marketing account with its own username/pasword and configure each mail client that needs to access that account with two accounts: the user account and the (possibly IMAP) account of marketing?
ciao, luigi
-- | +-[Luigi Rosa]--
On Tue, 2006-03-14 at 12:25 +0100, Luigi Rosa wrote:
On Tue, March 14, 2006 12:13, Brice Figureau wrote:
Now, to the point, I got a request (from marketing) to share a lot of maildirs between two (and possibly more) accounts. Those two accounts have differents uid/gid. The maildirs are actually in one of the account.
Why not just create a marketing account with its own username/pasword and configure each mail client that needs to access that account with two accounts: the user account and the (possibly IMAP) account of marketing?
That's finally what I'll do.
I came close to the (perfect) solution by playing with umask, namespaces, INDEX and CONTROL, unfortunately as there is no imap ACLs, every user could see the new namespaces (even if unix permissions prevented them to get the mail contents).
I also tried the symlink approach, but it globally failed as right now, users are using '.' as the folder separator (not the filesystem /), so I'd had to symlink every subfolder from the shared Maildir to the user's Maildirs, and moreover those users wouldn't have the possibility to add new folders (without my help).
Anyway, thank you for the idea.
Brice Figureau brice+dovecot@daysofwonder.com
participants (2)
-
Brice Figureau
-
Luigi Rosa