Re: Incorrect saved dates in mailboxes
Chris Szilagyi chris@apex-internet.com writes:
Recently, I noticed that our expunge script is not working, and I don't think it ever has on this server. On further inspection, it looks like the saved date for emails in the folders we want to expunge is set to a recent date (yesterday) for almost all messages. For example, when I run the command "doveadm -f tab fetch -u username date.saved mailbox Trash", the date for almost all of the messages is yesterday at the exact same time. I tried this on other users and they have this exact same timestamp shown for most of their messages, too.
I tried checking for "date.received" and that shows correct, it is "date.saved" that is not working.
Any idea of how or why this would not be showing the correct date? I've used this setup in the past on other servers with dovecot and it has worked great, no idea why we would be seeing this issue now.
I recall having the same problem. I think the "date.saved" is not instantiated in the cache until you query for it. So the value you were shown is when you last dumped its value if it wasn't previously set -- your run of same values coincided when you ran "doveadm fetch".
My expunge script just uses date.received instead -- it seems to work.
Joseph Tam jtam.home@gmail.com
On 2023-05-17 18:28, Joseph Tam wrote:
Chris Szilagyi chris@apex-internet.com writes:
Recently, I noticed that our expunge script is not working, and I don't think it ever has on this server. On further inspection, it looks like the saved date for emails in the folders we want to expunge is set to a recent date (yesterday) for almost all messages. For example, when I run the command "doveadm -f tab fetch -u username date.saved mailbox Trash", the date for almost all of the messages is yesterday at the exact same time. I tried this on other users and they have this exact same timestamp shown for most of their messages, too.
I tried checking for "date.received" and that shows correct, it is "date.saved" that is not working.
Any idea of how or why this would not be showing the correct date?
I've used this setup in the past on other servers with dovecot and it has worked great, no idea why we would be seeing this issue now.I recall having the same problem. I think the "date.saved" is not instantiated in the cache until you query for it. So the value you were shown is when you last dumped its value if it wasn't previously set -- your run of same values coincided when you ran "doveadm fetch".
My expunge script just uses date.received instead -- it seems to work.
Joseph Tam jtam.home@gmail.com
OK, that does make sense so far. Today I have checked, and the correct
dates seem to be showing up now after the initial date (ever since that
initial run of the "dovecot expunge" command was run on all mailboxes).
So in our case I have the expunge set to delete older than 30 days. I
assume if I wait 30 days from now, it will start working? Or did your
issue come back repeatedly?
I too thought about using date.received, but in our case date.saved is more ideal.
Thank you for your reply.
participants (2)
-
Chris Szilagyi
-
Joseph Tam