Been experimenting with virtual mailbox and have a question :-

I have defined 2 virtual mailboxes 'all' and 'combined' as follows ...


virtual/all/dovecot-virtual

virtual/combined
  inthread refs x-mailbox INBOX

virtual/combined/dovecot-virtual

!INBOX
INBOX/Sent
INBOX/Drafts
  all

When new mail comes I would assume that both virtual mailboxes should actually see the message but whilst an imap search command gets a result in the virtual/combined for some reason not every message is seen in virtual all - so was wondering what exactly does

'inthread refs x-mailbox INBOX'

do ? I would have thought new mail to inbox would just have a thread of 1 and be seen. If i remove the indexes from virtual then the messages appear so am thinking something not quite triggering an action. Any ideas ? What can I do to try and track down where problem lies or am i misunderstanding what 'inthread refs x-mailbox INBOX' should do ????


== 8< ==========

# doveconf -n
# 2.2.33.2 (d6601f4ec): /etc/dovecot/dovecot.conf
# Pigeonhole version 0.4.21 (92477967)
doveconf: Warning: service auth { client_limit=5000 } is lower than required under max. load (26096)
doveconf: Warning: service anvil { client_limit=5000 } is lower than required under max. load (9715)
# OS: Linux 3.10.0-693.11.6.el7.x86_64 x86_64 CentOS Linux release 7.3.1611 (Core)
auth_cache_negative_ttl = 2 mins
auth_cache_ttl = 3 mins
auth_master_user_separator = *
auth_mechanisms = plain login
auth_verbose = yes
auth_worker_max_count = 100
default_client_limit = 8192
default_process_limit = 8192
default_vsz_limit = 512 M
disable_plaintext_auth = no
doveadm_password =  # hidden, use -P to show it
imap_client_workarounds = delay-newmail tb-extra-mailbox-sep tb-lsub-flags
imap_idle_notify_interval = 1 mins
login_greeting = IMAP/POP3 ready - us11-001dm
mail_attachment_dir = /var/mail/sis/%Ld
mail_cache_min_mail_count = 5
mail_debug = yes
mail_plugins = " quota virtual"
mailbox_list_index = yes
managesieve_notify_capability = mailto
managesieve_sieve_capability = fileinto reject envelope encoded-character vacation subaddress comparator-i;ascii-numeric relational regex imap4flags copy include variables body enotify environment mailbox date index ihave duplicate mime foreverypart extracttext vacation-seconds spamtest spamtestplus editheader
mbox_write_locks = fcntl
mmap_disable = yes
namespace inbox {
  inbox = yes
  list = yes
  location =
  mailbox Archive {
    auto = create
    special_use = \Archive
  }
  mailbox Drafts {
    auto = create
    special_use = \Drafts
  }
  mailbox Sent {
    auto = create
    special_use = \Sent
  }
  mailbox Spam {
    auto = create
    special_use = \Junk
  }
  mailbox Trash {
    auto = create
    special_use = \Trash
  }
  prefix = INBOX/
  separator = /
  type = private
}
namespace virtual {
  list = no
  location = virtual:/var/lib/mail/dovecot/virtual:INDEX=~/virtual
  prefix = virtual/
  separator = /
  type = private
}
passdb {
  args = /etc/dovecot/sql_users.conf
  driver = sql
}
passdb {
  args = /etc/dovecot/sql_admin.conf
  driver = sql
}
plugin {
  mail_log_events = delete expunge
  mail_log_fields = uid box msgid size
  quota = dict:UserQuota::file:%h/dovecot-quota
  quota_rule2 = INBOX/Trash:storage=+10%%
  sieve = file:~/sieve/user;active=~/.dovecot.sieve
  sieve_default = file:/var/lib/mail/dovecot/sieve/default.sieve
  sieve_default_name = default
  sieve_editheader_max_header_size = 1k
  sieve_extensions = +spamtest +spamtestplus +editheader +vacation-seconds
  sieve_global = file:/var/lib/mail/dovecot/sieve
  sieve_quota_max_scripts = 5
  sieve_spamtest_max_value = 200
  sieve_spamtest_status_header = X-spam-score-int: -?([[:digit:]]+)
  sieve_spamtest_status_type = score
  sieve_vacation_default_period = 10d
  sieve_vacation_max_period = 30d
  sieve_vacation_min_period = 1s
}
pop3_client_workarounds = outlook-no-nuls oe-ns-eoh
pop3_fast_size_lookups = yes
protocols = imap pop3 lmtp sieve
service anvil {
  client_limit = 5000
}
service auth-worker {
  user = $default_internal_user
}
service auth {
  client_limit = 5000
  unix_listener auth_client {
    mode = 0660
    user = exim
  }
}
service doveadm {
  client_limit = 10
  inet_listener {
    address = *
    port = 4000
  }
  process_limit = 100
  process_min_avail = 10
  service_count = 1
}
service imap-login {
  inet_listener imap {
    port = 143
  }
  inet_listener imaps {
    port = 993
    ssl = yes
  }
  process_limit = 500
  process_min_avail = 10
  service_count = 1
}
service imap {
  executable = imap postlogin
  process_limit = 500
}
service managesieve-login {
  inet_listener sieve {
    port = 4190
  }
  process_limit = 20
  process_min_avail = 10
  service_count = 1
}
service managesieve {
  process_limit = 1024
}
service pop3-login {
  inet_listener pop3 {
    port = 110
  }
  inet_listener pop3s {
    port = 995
    ssl = yes
  }
  process_limit = 1000
  process_min_avail = 5
  service_count = 1
}
service pop3 {
  process_limit = 500
}
service postlogin {
  executable = script-login -d rawlog
}
shutdown_clients = no
ssl = required
ssl_cert = </etc/pki/dovecot/certs/dovecotl.com.pem
ssl_key =  # hidden, use -P to show it
userdb {
  driver = prefetch
}
userdb {
  args = /etc/dovecot/sql_users.conf
  driver = sql
}
protocol imap {
  imap_capability = +SPECIAL-USE
  mail_max_userip_connections = 50
  mail_plugins = " quota virtual imap_quota"
}
protocol pop3 {
  mail_max_userip_connections = 20
  mail_plugins = " quota virtual"
}
protocol lmtp {
  auth_username_format = %Lu
  mail_plugins = " quota virtual sieve quota"
  postmaster_address = mailer-daemon
}

======= 8< ==========

The below were searches in performed in the two mailboxes .. showing the found/not found status.

search in vritual/all

? search header Message-ID <
> * SEARCH ? OK Search completed (0.246 + 0.000 + 0.245 secs).

search in virtual combined

? search header Message-ID <
> * SEARCH 29268 ? OK Search completed (0.179 + 0.000 + 0.178 secs).


rgds

Matt

--