Using Dovecot with a Maildir set-up, I am trying to get the virtual "All" and virtual "Flagged" mailboxes to work. I have gotten all the other typical mailboxes working (Archive, Trash etc...)
The information here (https://doc.dovecot.org/configuration_manual/virtual_plugin/) doesn't really touch on the how-to actually interact with the virtual mailboxes.
My 15-mailboxes.conf look like this (snippet):
namespace inbox {
# These mailboxes are widely used and could perhaps be created automatically:
mailbox Archive {
auto = subscribe
special_use = \Archive
}
mailbox Drafts {
auto = subscribe
special_use = \Drafts
}
...
# If you have a virtual "All messages" mailbox:
mailbox virtual.All {
auto = create
special_use = \All
comment = All my messages
}
# If you have a virtual "Flagged" mailbox:
mailbox virtual.Flagged {
auto = create
special_use = \Flagged
comment = All my flagged messages
}
}
When I view the user's directory I see these folders were created:
drwxrwx---. 5 vmail vmail 135 Jan 25 17:01 .virtual.All/
drwxrwx---. 5 vmail vmail 158 Jan 25 17:14 .virtual.Flagged/
[.virtual.Flagged]# ll
total 20
drwxrwx---. 5 vmail vmail 158 Jan 25 17:14 ./
drwxrwx---. 20 vmail vmail 4096 Jan 25 17:33 ../
drwxrwx---. 2 vmail vmail 6 Jan 25 16:58 cur/
-rw-rw----. 1 vmail vmail 868 Jan 25 16:58 dovecot.index.cache
-rw-rw----. 1 vmail vmail 384 Jan 25 17:01 dovecot.index.log
-rw-rw----. 1 vmail vmail 51 Jan 25 17:01 dovecot-uidlist
-rw-r--r--. 1 vmail vmail 8 Jan 25 17:14 dovecot-virtual
-rw-rw----. 1 vmail vmail 0 Jan 25 16:58 maildirfolder
drwxrwx---. 2 vmail vmail 6 Jan 25 16:58 new/
drwxrwx---. 2 vmail vmail 6 Jan 25 16:58 tmp
dovecot-virtual:
*
flagged
A couple other relevant configurations I have in place:
10-mail.conf:
namespace inbox {
type = private
separator = .
prefix = INBOX.
inbox = yes
}
20-imap.conf:
protocol imap {
# Space separated list of plugins to load (default is global mail_plugins).
mail_plugins = $mail_plugins imap_quota virtual
}
My presumption is that when I mark an email message in the Inbox as FLAGGED (and I can confirm the \Flagged flag has been set) then I should then be able to either (1) see a copy of that message in the virtual.Flagged folder, or (2) when I use an imap command to get the message nums or whatever, it should return that message that is flagged in the inbox as a result.
Side note: This set-up uses the php-imap library to interact with Dovecot.
Any help, or just concept of how the virtual/All virtual/Flagged directories work would be really appreciated.