I wrote:
I was going to suggest that you dump the savedbefore dates on all your messages to see what Dovecot thinks your message's timestamps are. I tried it out myself and was surprised to find *all* messages in *any* mailbox I looked at gave the same timestamp -- probably that of the latest message.
For example,
# doveadm -f tab fetch -u {user} "uid date.saved" mailbox Trash uid date.saved 23624 2018-07-18 14:50:03 23625 2018-07-18 14:50:03 [... 3657 lines removed ...] 27295 2018-07-18 14:50:03 27296 2018-07-18 14:50:03 27297 2018-07-18 14:50:03
I wrote about a related issue several years back, starting with
https://dovecot.org/list/dovecot/2012-March/134706.html
I'm not sure how I got over this and got usable "date.saved" cache values, and why it stopped working. Maybe I need to set something like
mail_always_cache_fields = date.saved
mail_cache_fields = date.saved
to force date.saved to be cached.
On Thu, 19 Jul 2018, Sophie Loewenthal wrote:
And here is mine. All dates are todays!
# doveadm -f tab fetch -u test@example.org "uid date.saved" mailbox Trash uid date.saved 6829 2018-07-18 06:04:50 6830 2018-07-18 11:10:13 6831 2018-07-18 16:16:15 SNIP a lot of lines... 6873 2018-07-18 18:54:07 6874 2018-07-18 18:54:07 6875 2018-07-18 18:54:07 6876 2018-07-18 18:54:07 6877 2018-07-18 21:23:08
You may or may not have the same problem I do -- your timestamps actually differ, whereas mine are all the same.
Joseph Tam jtam.home@gmail.com