<div dir="ltr">Hello,<br><br>I'm trying to use the virtual "All" and "Flagged" mailboxes as described in 15-mailboxes.conf.<br><br>The information here (<a href="https://doc.dovecot.org/configuration_manual/virtual_plugin/">https://doc.dovecot.org/configuration_manual/virtual_plugin/</a>) doesn't really touch on how to actually interact with the virtual mailboxes.<br><br>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 from the virtual.Flagged folder/mailbox, it should return the message that is flagged in the inbox as a result.<br><br>Additionally, I'm presuming that for each new user that automatically gets added, I would have to create my own script that would add the dovecot-virtual file, dovecot doesn't do that on its own.<div><br>When I view the user's directory I see these folders were created:<br>---<div>[snippet]<br>drwxrwx---.  5 vmail vmail   135 Jan 25 17:01  .virtual.All/<br>drwxrwx---.  5 vmail vmail   158 Jan 25 17:14  .virtual.Flagged/<br>[.virtual.Flagged]# ll<br>total 20<br>drwxrwx---.  5 vmail vmail  158 Jan 25 17:14 ./<br>drwxrwx---. 20 vmail vmail 4096 Jan 25 17:33 ../<br>drwxrwx---.  2 vmail vmail    6 Jan 25 16:58 cur/<br>-rw-rw----.  1 vmail vmail  868 Jan 25 16:58 dovecot.index.cache<br>-rw-rw----.  1 vmail vmail  384 Jan 25 17:01 dovecot.index.log<br>-rw-rw----.  1 vmail vmail   51 Jan 25 17:01 dovecot-uidlist<br>-rw-r--r--.  1 vmail vmail    8 Jan 25 17:14 dovecot-virtual<br>-rw-rw----.  1 vmail vmail    0 Jan 25 16:58 maildirfolder<br>drwxrwx---.  2 vmail vmail    6 Jan 25 16:58 new/<br>drwxrwx---.  2 vmail vmail    6 Jan 25 16:58 tmp<br>[.virtual.Flagged]# cat dovecot-virtual<br>*<br>  flagged<br>---<br><br>Side note: This set-up uses the php-imap library to interact with Dovecot.<br><br>Any help, or just concept of how the virtual/All virtual/Flagged directories work would be really appreciated.<br><br><br>CONFIGURATION:<br><br>dovecot -n<br># 2.3.8 (9df20d2db): /etc/dovecot/dovecot.conf<br># OS: Linux 4.18.0-348.2.1.el8_5.x86_64 x86_64 CentOS Linux release 8.5.2111 xfs<br># Hostname: [DOMAIN REDACTED]<br>auth_debug = yes<br>auth_verbose = yes<br>auth_verbose_passwords = yes<br>first_valid_uid = 1000<br>lda_mailbox_autocreate = yes<br>log_timestamp = "%Y-%m-%d %H:%M:%S "<br>mail_location = maildir:/home/vmail/%d/%n/Maildir<br>mail_plugins = " quota"<br>mbox_write_locks = fcntl<br>namespace {<br>  location = virtual:/home/vmail/%d/%n/Maildir/virtual:LAYOUT=maildir++<br>  prefix = virtual.<br>  separator = .<br>  type = private<br>}<br>namespace inbox {<br>  inbox = yes<br>  location =<br>  mailbox Archive {<br>    auto = subscribe<br>    special_use = \Archive<br>  }<br>  mailbox Drafts {<br>    auto = subscribe<br>    special_use = \Drafts<br>  }<br>  mailbox Junk {<br>    auto = subscribe<br>    special_use = \Junk<br>  }<br>  mailbox Sent {<br>    auto = subscribe<br>    special_use = \Sent<br>  }<br>  mailbox "Sent Messages" {<br>    auto = subscribe<br>    special_use = \Sent<br>  }<br>  mailbox Trash {<br>    auto = subscribe<br>    special_use = \Trash<br>  }<br>  mailbox virtual.All {<br>    auto = create<br>    comment = All my messages<br>    special_use = \All<br>  }<br>  mailbox virtual.Flagged {<br>    auto = create<br>    comment = All my flagged messages<br>    special_use = \Flagged<br>  }<br>  prefix = INBOX.<br>  separator = .<br>  type = private<br>}<br>passdb {<br>  args = /etc/dovecot/dovecot-sql.conf.ext<br>  driver = sql<br>}<br>passdb {<br>  driver = pam<br>}<br>plugin {<br>  quota = maildir:User quota<br>  quota_grace = 10%%<br>  quota_max_mail_size = 30M<br>  quota_rule = *:storage=100M<br>  quota_rule2 = INBOX.Trash:storage=+10M<br>  quota_status_nouser = DUNNO<br>  quota_status_overquota = 552 5.2.2 Mailbox is full<br>  quota_status_success = DUNNO<br>}<br>protocols = imap pop3<br>service auth-worker {<br>  user = root<br>}<br>service auth {<br>  unix_listener /var/spool/postfix/private/auth {<br>    group = postfix<br>    mode = 0666<br>    user = postfix<br>  }<br>  unix_listener auth-master {<br>    mode = 0600<br>    user = vmail<br>  }<br>  unix_listener auth-userdb {<br>    mode = 0600<br>    user = vmail<br>  }<br>  user = dovecot<br>}<br>service imap-login {<br>  inet_listener imaps {<br>    port = 993<br>    ssl = yes<br>  }<br>}<br>service pop3-login {<br>  inet_listener pop3s {<br>    port = 995<br>    ssl = yes<br>  }<br>}<br>service quota-status {<br>  client_limit = 1<br>  executable = quota-status -p postfix<br>  inet_listener {<br>    port = 12340<br>  }<br>}<br>service stats {<br>  unix_listener stats-reader {<br>    group = vmail<br>    mode = 0660<br>    user = vmail<br>  }<br>  unix_listener stats-writer {<br>    group = vmail<br>    mode = 0660<br>    user = vmail<br>  }<br>}<br>ssl = required<br>ssl_cert = </etc/letsencrypt/live/[DOMAIN REDACTED]/fullchain.pem<br>ssl_cipher_list = PROFILE=SYSTEM<br>ssl_key = # hidden, use -P to show it<br>userdb {<br>  args = uid=5000 gid=5000 home=/home/vmail/%d/%n allow_all_users=yes<br>  driver = static<br>}<br>userdb {<br>  driver = passwd<br>}<br>protocol lda {<br>  auth_socket_path = /var/run/dovecot/auth-master<br>  log_path = /home/vmail/dovecot-deliver.log<br>  postmaster_address = postmaster@[DOMAIN REDACTED]<br>}<br>protocol pop3 {<br>  pop3_uidl_format = %08Xu%08Xv<br>}<br>protocol imap {<br>  mail_plugins = " quota imap_quota virtual"<br>}<br><br></div></div></div>