@@ -32,27 +32,33 @@ Then, you'll have to create a [[link,namespaces,namespace]] for the virtual
3232mailboxes, for example:
3333
3434``` [dovecot.conf]
35- namespace {
35+ namespace virtual {
3636 prefix = virtual/
3737 separator = /
3838 mail_driver = virtual
3939 mail_path = ~/Maildir/virtual
40+
41+ mailbox All {
42+ auto = no
43+ special_use = \All
44+ }
45+ [...]
4046}
4147```
4248
4349After this you can create virtual mailboxes under ` ~/Maildir/virtual ` . By
4450default it uses the ` fs ` layout, so you can create directories such as:
4551
46- * INBOX : ` ~/Maildir/virtual/INBOX / `
52+ * All : ` ~/Maildir/virtual/All / `
4753* Sub/mailbox: ` ~/Maildir/virtual/Sub/mailbox/ `
4854
4955If you prefer to use the Maildir++ layout instead, set
5056[[ setting,mailbox_list_layout,maildir++]] .
5157
5258### Virtual Mailboxes
5359
54- For each virtual directory you need to create a ` dovecot-virtual ` file. Its
55- syntax is like:
60+ For each directory ( virtual mailbox) you need to create a ` dovecot-virtual ` file.
61+ Its syntax is like:
5662
5763```
5864<1+ mailbox patterns>
@@ -71,14 +77,16 @@ aren't noticed.
7177prefix. For example if you have namespaces with an empty prefix and a prefix
7278` mail/ ` :
7379
74- * ` * ` matches only mailboxes from the namespace with empty prefix
75- * ` mail* ` matches mailboxes beginning with name ` mail ` from the namespace
76- with empty prefix
77- * ` mail/* ` matches only mailboxes from the ` mail/ ` namespace
80+ * ` * ` only matches mailboxes from the namespace with an empty prefix.
81+ * ` mail* ` matches mailboxes that begin with ` mail ` from the namespace with
82+ an empty prefix.
83+ * ` mail/* ` only matches mailboxes from the ` mail/ ` namespace.
7884
79- Beware that ` * ` will not match any mailbox which already has a more
85+ Beware that ` * ` will not match any mailbox that already has a more
8086specialized match!
8187
88+ Currently, ` * ` doesn't match INBOX.
89+
8290The mailbox names have special prefixes:
8391
8492* ` - ` : Don't include this mailbox.
@@ -131,14 +139,22 @@ Virtual/All folder was configured with INBOX as the save destination, this
131139Virtual/All folder:
132140
133141``` [sieve.before]
134- imapsieve_mailbox_name = INBOX # Virtual/All would NOT work
135- imapsieve_mailbox_causes = COPY
136- imapsieve_mailbox_before = /etc/dovecot/sieve.before
142+ mailbox INBOX { # Virtual/All would NOT work
143+ sieve_script before-copy {
144+ type = before
145+ cause = copy
146+ path = /etc/dovecot/sieve.before
147+ }
148+ }
137149```
138150
139- Also, the ` imap.mailbox ` environment always contains INBOX, even when
151+ Also, the ` imap.mailbox ` Sieve ` environment ` variable always contains INBOX, even when
140152saving via Virtual/All folder.
141153
154+ ::: warning
155+ Currently, imapsieve scripts that are defined within a virtual mailbox are not being called.
156+ :::
157+
142158## Mailbox Selection Based on METADATA
143159
144160Instead of a mailbox name, you can specify a metadata filter:
0 commit comments