[Dovecot] public namespace
Hello,
dovecot -n
# 2.0.18: /etc/dovecot/dovecot.conf
# OS: Linux 3.2.0-2-amd64 x86_64 Debian wheezy/sid
mail_gid = 5000
mail_location = maildir:~:INDEX=/var/mail/indexes/%d/%n
mail_privileged_group = vmail
mail_uid = 5000
namespace {
hidden = no
inbox = yes
list = yes
location =
prefix =
separator = /
subscriptions = yes
type = private
}
namespace {
list = children
location = maildir:/var/mail/vhosts/%d/public:INDEX=/var/mail/indexes/%d/%n/public
prefix = Public/
separator = /
subscriptions = no
type = public
}
i´m a little bit confused but I hope I find help here.
The user mailboxes work perfectly just the public mailbox is a little bit tricky I expect that all public maildirs be placed under /var/mail/vhosts/%d/public.
They are created by defining a public namespace, under which all the shared mailboxes are.
For those special users, I have set the maillocation via passwd file to /%d/public/%n, all other users have /%d/%n.
So we have following folder structure
\public
\public\.info
\public\.lager
\public\.buchhaltung
And so on Thats works fine, but with subfolder start the problems. When the info-user loggs on and creates a subfolder under his INBOX(called hust2) then no other people can see this. Otherside, if a normal user creates a folder in public folder info(called hust), the info user can´ t see this one.
If I look to filesystem, the reason is clear:
%d/public/.info# ls -la
insgesamt 32
drwx--S---+ 2 vmail vmail 6 Jun 19 11:50 cur
-rwxrwx---+ 1 vmail vmail 51 Jun 21 09:50 dovecot-uidlist
-rw-rw----+ 1 vmail vmail 8 Jun 19 11:51 dovecot-uidvalidity
-r--r-----+ 1 vmail vmail 0 Jun 19 11:50 dovecot-uidvalidity.4fe04b06
drwx--S---+ 5 vmail vmail 78 Jun 19 11:54 .INBOX.hust2
drwx--S---+ 2 vmail vmail 6 Jun 19 11:50 new
-rw-rw----+ 1 vmail vmail 18 Jun 19 11:51 subscriptions
drwx--S---+ 2 vmail vmail 6 Jun 19 11:50 tmp
drwx--S---+ 5 vmail vmail 78 Jun 21 09:51 .Trash
%d/public# ls -la
insgesamt 16
-rw-rw----+ 1 vmail vmail 8 Jun 19 11:51 dovecot-uidvalidity
-r--r-----+ 1 vmail vmail 0 Jun 19 11:51 dovecot-uidvalidity.4fe04b36
drwx--S---+ 7 vmail vmail 4096 Jun 21 09:50 .info
drwx--S---+ 5 vmail vmail 78 Jun 21 09:51 .info.hust
A look to the info mailbox makes it clear:
info@BLABLA
\INBOX
\hust2
create by info user in his mailbox
\Trash
\Public
\info
his own public share
\hust
create by other user in public folder
What I need is:
%d/public/lager/cur
%d/public/lager/new
%d/public/lager/tmp
%d/public/lager/.foo
%d/public/lager/.foo.bar
%d/public/ info /cur
%d/public/ info /new
%d/public/ info /tmp
%d/public/info/.hust
%d/public/info/.hust.deeperhust
%d/public/info/.hust2
All public maildirs under /%d/public/%n
Must I create a namespace for all public maildirs?:
namespace {
location = maildir:/var/mail/vhosts/%d/public/info
}
namespace {
location = maildir:/var/mail/vhosts/%d/public/lager
}
I can´ t figure out on my own, please give me an explanation.
Thanks for soon comment.
Daniel
participants (1)
-
Daniel Fischer