Re: What is the difference between BEFORE, SENTBEFORE, and SAVEDBEFORE?
From: Paul Pace <paul@mostlybsd.com>
I don't know exactly the answer to your query, but the semantics of each term may not be the problem. I had this exact problem a decade ago with my own trash purging script.
If you dump the above values e.g.
doveadm fetch -ftab -A 'mailbox date.received' mailbox Trash BEFORE 90d
you may find that many of them have the same value, and what's more, the time coincides with the first time you queried for that value (i.e. when you ran the above doveadm fetch). I think these fields may not have cached values before you ask for it, then it gets instantiated the current timestamp when you do. If you do a fetch every day, you'll eventually reach 90d, and it will work forever more (+/- 1 day).
Perhaps adding those fields into these settings is a more direct and better solution:
https://doc.dovecot.org/configuration_manual/mail_cache_settings/
Joseph Tam <jtam.home@gmail.com>
On Thu, Jan 18, 2024 at 6:42 PM Joseph Tam <jtam.home@gmail.com> wrote:
If you dump the above values e.g.
doveadm fetch -ftab -A 'mailbox date.received' mailbox Trash BEFORE 90d
Correction: if what I suspect is true, this won't show you anything as all your messages will be younger than 90d. Instead, remove the "BEFORE 90d" condition and dump all values.
Joseph Tam <jtam.home@gmail.com>
participants (1)
-
Joseph Tam