On 4/30/2019 11:13 PM, MRob via dovecot wrote:
The examples in 15-mailboxes.conf
# If you have a virtual "All messages" mailbox: #mailbox virtual/All { # special_use = \All # comment = All my messages #}
# If you have a virtual "Flagged" mailbox: #mailbox virtual/Flagged { # special_use = \Flagged # comment = All my flagged messages #}
They seem to reference some kind of virtual mailbox setup that doesn't compare to the docs for the "virtual" plugin. That plugin says we should create a separate namespace instead, like "namespace virtual" and put files representing the virtual folders into user maildirs. What if we use mdbox? add the files to user/mailboxes director I will guess.
Is there a way to use the mailbox examples in the inbox namespace in the default config? Does it use some other method different from the virtual plugin? maybe more config hints for those examples would be helpful.
Thank you.
You will indeed need to setup a virtual namespace. The virtual mailboxes will exist in a folder alongside but separate from your primary mailstore. If your default namespace is:
namespace inbox { type = private separator = / prefix = location = maildir:/var/mail/%d/%n/Maildir inbox = yes hidden = no list = yes subscriptions = yes }
then add
namespace virtual { prefix = virtual/ separator = / location = virtual:/var/mail/%d/%n/virtual subscriptions = no list = children }
So for user daniel@somedomain.org there will exist: /var/mail/somedomain.org/daniel/Maildir /var/mail/somedomain.org/daniel/virtual
And then you'll need to create the virtual definition files for each user's mailbox as needed.
-- Daniel