Score:0

Dovecot shared mailbox - access all folders at the root - doveadm

cn flag

On a dovecot IMAP setup,we need to share the root of the other user's mailbox; i.e. Inbox bu also Sent, Trash, etc.

Here we could only share 'INBOX' as doveadm does not accept / nor * when giving the right acl and register in the dict.

Any clue on how to share entire mailbox and populate `shared/user/{Inbox, Sent, Trash,...} ?

Setup

On a postfix+dovecot setup with system users, mailbox sharing has been setup:

acl.conf:
plugin {
  #acl = vfile:/etc/dovecot/global-acls:cache_secs=300
  acl = vfile
}

# To let users LIST mailboxes shared by other users, Dovecot needs a
# shared mailbox dictionary. For example:
plugin {
  #acl_shared_dict = file:/var/lib/dovecot/shared-mailboxes
  acl_shared_dict = file:/var/mail/shared-dict

}
shared.conf:
namespace {
  type = shared
  separator = /
  prefix = shared/%%u/
  location = maildir:%%h/mail:INDEX=~/mail/shared/%%u
  #subscriptions = no
  list = children
}
mail_shared_explicit_inbox = yes

Using doveadm to populate the acl and the dictionnary:

doveadm -Dv acl add -u james 'INBOX' user=john lookup read write write-seen write-deleted insert post expunge create delete admin

All works.

Problem

  1. Folders

Logged in as james, the shared/john folder show only the inbox folder. ANd its subfolders if we create any. Hence we tried with the mail_shared_explicit_inbox setting to make the other folders appear. We also tried to use '*' or '' in the doveadm command, it fails. With no luck.

Is there any way to show in shared/john the entire mailbox of james ?

  1. setup in MUA someone else's mailbox. If we setup in any IMAP MUA the address of john, but with the login/passwd of james, the mailbox that will be shown will actually be james's. Suspect it comes from:
userdb {
  driver = passwd
  override_fields = home=/var/spool/mail/%d/%u uid=mail gid=mail
}

This was to enable running as mail:mail, which does not have access to the home folders.

and/or out of any namespace brackets:

mail_location = maildir:~/mail

But we cannot use %%u in here since it needs %u to access when the user himself is logged in.

Any way to perform that ? The purpose is to have a common mailbox that people can use indistinctively.

Thanks in advance !

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.