What is the difference between BEFORE, SENTBEFORE, and SAVEDBEFORE?
19 Jan
2024
19 Jan
'24
3:07 a.m.
In doveadm-search-query(7), it states:
BEFORE date specification
Matches messages with an internal date before date
specification.
SENTBEFORE date specification
Matches messages with a Date: header before date specification.
SAVEDBEFORE date specification
Matches messages, which were saved before date specification.
I am creating a cron job to purge old messages in Trash or Spam folders, but I discovered using doveadm search queries using savedbefore that somehow no message in any of the folders shows up with queries starting at 5d, even though there are much older messages.
doveadm search mailbox Trash before 90d -A | wc -l 277 doveadm search mailbox Trash sentbefore 90d -A | wc -l 277 doveadm search mailbox Trash savedbefore 90d -A | wc -l 0
For my purpose, I'm not clear on the differences between the different queries and am wondering what will be the better option.
Thank you,
Paul
300
Age (days ago)
300
Last active (days ago)
0 comments
1 participants
participants (1)
-
Paul Pace