{{ ansible_managed | comment }}

# public-shared-mailboxes.conf

# Public mailboxes are typically mailboxes that are visible to all users or to
# large user groups. They are created by defining a public namespace, under
# which all the shared mailboxes are.

# Per-user \Seen flag (v2.2+)
# Since v2.2 the recommended way to enable private flags for shared mailboxes
# is to create private indexes with :INDEXPVT=<path>. This creates
# dovecot.index.pvt[.log] files, which contain only the message UIDs and the
# private flags. Currently the list of private flags is hardcoded only to
# the \Seen flag.

namespace {
  # type = public: Contains public mailboxes
  type = public
  # seperator must be . for Maildir
  separator = .
  prefix = Public.

  ### per user seen flag: (proofed 16.04.2021 by SK)
  # ( hint: mail_home = /vol/mail/maildirs/%n/ )
  #
  #location = maildir:/vol/mail/public:INDEXPVT=/vol/mail/maildirs/%n/public_PVT
  # to make subscrition work add storage of subscriptions to userdir:
  # and set subscriptions = yes
  # see: https://www.dovecot.org/list/dovecot/2010-October/054310.html
  location = maildir:/vol/mail/public:INDEXPVT=/vol/mail/maildirs/%n/public_PVT:SUBSCRIPTIONS=/public_subscriptions/%n
  ###  use global seen flag: (proofed 20.4.2021 by SK):
  #location = maildir:/vol/mail/public

  # hint:
  # Note that with Maildir format Dovecot uses Maildir++ layout by default
  # for folders, where the folder names must begin with a “.” or Dovecot
  # will ignore them.
  # create new public maildirs with
  #      maildirmake.dovecot /vol/mail/public/.bacula vmail

  # Typically you want each user to have control over their own subscriptions
  # for mailboxes in public namespaces. This is why you should set
  # subscriptions=no to the namespace. Dovecot will then use the parent
  # namespace's subscriptions file. Note that this practically means you must
  # have a namespace with empty prefix, otherwise there is no "parent
  # namespace".
  # Whether subscriptions are stored in this namespace. This is usually set to
  # no for shared namespaces so that the shared folders’ subscriptions are
  # stored in the user’s primary subscriptions file. When set to no, the
  # subscriptions are stored in the first parent namespace (based on the
  # prefix) that has this setting set to yes.
  #subscriptions = no
  # see https://www.dovecot.org/list/dovecot/2010-October/054310.html :
  subscriptions = yes

  list = children
}

# this is done in /etc/dovecot/conf.d/01-dovecot-postfix.conf :
#mail_plugins = acl
#  protocol imap {
#  # mail_plugins = $mail_plugins acl
#  mail_plugins = $mail_plugins acl imap_acl
#}

plugin {
  # vfile backend supports per-mailbox ACLs and global ACLs.
  acl = vfile
  # After this you have to place dovecot-acl files in every mailbox/folder
  # below /var/mail/public with rights for that folder (e.g. user=someone lr).
}

