<div dir="ltr">Thank you Aki.<br><br>I have updated as you suggested:<br><br>10-mail.conf<br>namespace virtual {<br> location = virtual:/etc/dovecot/virtual:INDEX=~/.virtual:CONTROL=~/.virtual:VOLATILEDIR=~/.virtual/<br> type = private<br> #prefix = virtual.<br> separator = .<br>}<br><br>I manually added the directory structure and files:<br>[dovecot]# ll<br>total 32<br>drwxr-xr-x. 5 root root 121 Jan 31 14:41 ./<br>drwxr-xr-x. 115 root root 8192 Jan 31 11:05 ../<br>drwxr-xr-x. 3 root root 57 Jan 7 10:27 bak/<br>drwxr-xr-x. 2 root root 4096 Jan 25 15:05 conf.d/<br>-rw-r--r--. 1 root root 2658 Jan 25 16:52 dovecot.conf<br>-rw-r--r--. 1 root root 4391 Oct 8 2019 dovecot.conf-backup<br>-rw-r-----. 1 root dovecot 280 Jan 25 10:41 dovecot-sql.conf.ext<br>drwxr-xr-x. 4 root root 32 Jan 31 14:41 virtual/<br>[dovecot]# ll virtual/<br>total 0<br>drwxr-xr-x. 4 root root 32 Jan 31 14:41 ./<br>drwxr-xr-x. 5 root root 121 Jan 31 14:41 ../<br>drwxr-xr-x. 2 root root 29 Jan 31 14:41 All/<br>drwxr-xr-x. 2 root root 29 Jan 31 14:41 Flagged/<br>[dovecot]# ll virtual/All/<br>total 4<br>drwxr-xr-x. 2 root root 29 Jan 31 14:41 ./<br>drwxr-xr-x. 4 root root 32 Jan 31 14:41 ../<br>-rw-r--r--. 1 root root 10 Jan 31 14:31 dovecot-virtual<br>[]# cat virtual/All/dovecot-virtual<br>*<br> all<br><br>I restarted the dovecot service. When I request to see the emails in the virtual "All" folder (e.g. virtual.All), just like I would do with say the Inbox or Trash folder, the virtual* folder gets created in the user directory, but no emails are "found" or returned.<br><br>[Maildir]# pwd<br>/home/vmail/<a href="http://example.com/user.name/Maildir">example.com/user.name/Maildir</a><br>[Maildir]# ll<br>total 80<br>drwxrwx---. 20 vmail vmail 4096 Jan 31 14:31 ./<br>drwxrwx---. 4 vmail vmail 37 Jan 31 14:19 ../<br>drwxrwx---. 5 vmail vmail 135 Jan 25 11:26 .Archive/<br>drwx------. 2 vmail vmail 4096 Jan 31 14:28 cur/<br>-rw-rw----. 1 vmail vmail 896 Jan 25 17:10 dovecot.index<br>-rw-rw----. 1 vmail vmail 22596 Jan 31 14:01 dovecot.index.cache<br>-rw-rw----. 1 vmail vmail 11160 Jan 31 14:28 dovecot.index.log<br>-rw-rw----. 1 vmail vmail 1896 Jan 28 17:15 dovecot.list.index<br>-rw-rw----. 1 vmail vmail 7752 Jan 31 14:36 dovecot.list.index.log<br>-rw-rw----. 1 vmail vmail 384 Jan 25 15:32 dovecot.mailbox.log<br>-rw-rw----. 1 vmail vmail 1887 Jan 25 11:35 dovecot-uidlist<br>-rw-rw----. 1 vmail vmail 8 Jan 31 14:31 dovecot-uidvalidity<br>-r--r--r--. 1 vmail vmail 0 Jan 24 16:35 dovecot-uidvalidity.61ef29a3<br>drwxrwx---. 5 vmail vmail 183 Jan 28 17:22 .Drafts/<br>drwxrwx---. 5 vmail vmail 135 Jan 25 11:24 .Junk/<br>-rw-rw----. 1 vmail vmail 1130 Jan 28 17:37 maildirsize<br>drwx------. 2 vmail vmail 6 Jan 25 11:34 new/<br>drwxrwx---. 5 vmail vmail 135 Jan 31 04:29 .Sent/<br>drwxrwx---. 5 vmail vmail 135 Jan 25 10:51 '.Sent Messages'/<br>-rw-rw----. 1 vmail vmail 43 Jan 25 10:50 subscriptions<br>drwx------. 2 vmail vmail 6 Jan 25 11:35 tmp/<br>drwxrwx---. 5 vmail vmail 135 Jan 25 13:23 .Trash/<br>drwxrwx---. 5 vmail vmail 135 Jan 31 14:36 .virtual.All/<br>drwxrwx---. 5 vmail vmail 135 Jan 31 14:28 .virtual.Flagged/<br>[Maildir]ll .virtual.All/<br>total 16<br>drwxrwx---. 5 vmail vmail 135 Jan 31 14:36 ./<br>drwxrwx---. 20 vmail vmail 4096 Jan 31 14:31 ../<br>drwxrwx---. 2 vmail vmail 6 Jan 31 14:31 cur/<br>-rw-rw----. 1 vmail vmail 868 Jan 31 14:31 dovecot.index.cache<br>-rw-rw----. 1 vmail vmail 472 Jan 31 14:36 dovecot.index.log<br>-rw-rw----. 1 vmail vmail 51 Jan 31 14:36 dovecot-uidlist<br>-rw-rw----. 1 vmail vmail 0 Jan 31 14:31 maildirfolder<br>drwxrwx---. 2 vmail vmail 6 Jan 31 14:31 new/<br>drwxrwx---. 2 vmail vmail 6 Jan 31 14:31 tmp/<br><br>Any suggestions what I should work on next to troubleshoot? Again, my goal is to be able to "fetch" all emails with the virtual.All, and all "flagged" emails with virtual.Flagged.<br><br>Thank you.<br><br><br><br>---<br>[]# doveconf -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: <a href="http://example.com">example.com</a><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 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 = subscribe<br> comment = All my messages<br> special_use = \All<br> }<br> mailbox virtual.Flagged {<br> auto = subscribe<br> comment = All my flagged messages<br> special_use = \Flagged<br> }<br> prefix = INBOX.<br> separator = .<br> type = private<br>}<br>namespace virtual {<br> location = virtual:/etc/dovecot/virtual:INDEX=~/.virtual:CONTROL=~/.virtual:VOLATILEDIR=~/.virtual/<br> prefix =<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/<a href="http://example.com/fullchain.pem">example.com/fullchain.pem</a><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 = <a href="mailto:postmaster@example.com">postmaster@example.com</a><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><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Jan 31, 2022 at 12:30 AM Aki Tuomi <<a href="mailto:aki.tuomi@open-xchange.com">aki.tuomi@open-xchange.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
> On 26/01/2022 19:48 A B <<a href="mailto:alex.bryant@trancos.com" target="_blank">alex.bryant@trancos.com</a>> wrote:<br>
> <br>
> <br>
> 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/" rel="noreferrer" target="_blank">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.<br>
> <br>
> When I view the user's directory I see these folders were created:<br>
> ---<br>
<br>
<snip/><br>
<br>
You usually use these global virtual folders like this:<br>
<br>
namespace virtual {<br>
location = virtual:/etc/dovecot/virtual:INDEX=~/.virtual:CONTROL=~/.virtual:VOLATILEDIR=~/.virtual/<br>
... rest of the settings<br>
}<br>
<br>
<br>
Then you create the dovecot-virtual files under /etc/dovecot/virtual like<br>
<br>
/etc/dovecot/virtual/Flagged/dovecot-virtual<br>
<br>
This lets you creat them automatically for all users.<br>
<br>
Aki<br>
</blockquote></div>