2

I have a dovecot IMAP server (version 2.1.7) with Maildirs and a virtual user setup (e.g. all accounts are mapped to the same system user). I’d like to create a public namespace shared between users A and B, but not any other user.

I tried to set up the namespace as follows:

namespace {
  type = public
  separator = .
  prefix = INBOX.XFeeds.
  location = maildir:/var/vhosts/feeds:INDEX=~/Maildir/feeds/
  subscriptions = no
}

together with a acl-file:

/var/vhosts/feeds $ cat dovecot-acl
user=A lrwstipekxa
user=B lrwipk

Now user C cannot access the contents of the XFeeds mailbox, but it still hows up in its IMAP client. How can I make sure that other users cannot observe that this namespace exists?

Joachim Breitner
  • 3,469
  • 3
  • 17
  • 20

1 Answers1

0

One way to achieve this is to disable the namespace by default:

namespace foo {
  type = public
  separator = .
  prefix = INBOX.XFeeds.
  location = maildir:/var/vhosts/feeds:INDEX=~/Maildir/feeds/
  subscriptions = no
  list = no
}

and enable it for selected users via userdb. E.g. if you are using a password file, put

username:{MD5}password::::::userdb_namespace/foo/list=yes

in the file. (Thanks to Steffen Kaiser on the dovecot mailinglist for helping with this.)

Joachim Breitner
  • 3,469
  • 3
  • 17
  • 20