[Dovecot] Shared maildir through namespace help...

Brice Figureau brice+dovecot at daysofwonder.com
Tue Mar 14 13:13:56 EET 2006


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 at daysofwonder.com>



More information about the dovecot mailing list