Thanks Aki,
Just a followup regarding this. I set
"mail_always_cache_fields" to the following in dovecot configuration file:
mail_cache_fields = flags,imap.body,imap.bodystructure
mail_always_cache_fields = imap.body,imap.bodystructure
I run the following command to ensure that these configurations have an effect on the caching behavior:
doveadm index -u bob INBOX
I notice that "data->wanted_fields" in index-mail.c is as follows:
(MAIL_FETCH_STREAM_HEADER | MAIL_FETCH_STREAM_BODY | MAIL_FETCH_RECEIVED_DATE | MAIL_FETCH_SAVE_DATE | MAIL_FETCH_PHYSICAL_SIZE | MAIL_FETCH_VIRTUAL_SIZE | MAIL_FETCH_UIDL_BACKEND | MAIL_FETCH_GUID | MAIL_FETCH_POP3_ORDER)
Since I made the changes above I except
data->wanted_fields to contain MAIL_FETCH_IMAP_BODY and MAIL_FETCH_IMAP_BODYSTRUCTURE. This tells me that these fields are not being cached?
Am I doing something wrong here?