On 1. Dec 2021, at 13.05, Einar Bjarni Halldórsson <einar@isnic.is> wrote:


Adding it to mail_always_cache_fields does not miraculously make cache updated. Each mail needs to be accessed for that to happen.
Ie. With doveadm fetch.
I couldn't figure out the doveadm fetch syntax for searching so I just ran the search manually twice. I assume that would update the cache?
You can inspect the index files with doveadm dump to check what is cached. Not sure how it went with mdbox storage driver.
According to `man doveadm-dump` it just seems to dump index files. I tried dumping the cache file but it complains that it can't auto detect the file type.


Try this:

[root@ketola .INBOX]# pwd
/vmail/sami@ketola.io/index/.INBOX
[root@ketola .INBOX]# doveadm dump . | grep -c hdr.message-id
11007

This is Maildir, but it should work the same way with mdbox.

Sami