Sorry, mistake:
I meant all dates in Trash are dated today, but the times differ.
Inbox is different, but the last file in user@domain/cur differs from dovecot fetch date.saved.
-rw------- 1 vmail mail 3566 2011-10-08 13:06:16.000000000 +0000 1371065422.M299803P23725.logout,S=3566,W=3659:2,Shj -rw------- 1 vmail mail 14621 2011-09-16 11:49:45.000000000 +0000 1507747187.M109389P30107.logout,W=14988,S=14621:2,Shj
On 19 Jul 2018, at 00:17, Sophie Loewenthal <sophie@klunky.co.uk> 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 6832 2018-07-18 16:16:15 6833 2018-07-18 08:22:55 6834 2018-07-18 16:16:15 6835 2018-07-18 08:47:10 6836 2018-07-18 09:12:11 6837 2018-07-18 09:53:31 6838 2018-07-18 11:03:31 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
# doveadm -f tab fetch -u sophie@klunky.org "uid date.saved" mailbox Inbox|head uid date.saved 57 2018-01-23 21:05:06 60 2018-01-23 21:05:06 61 2018-01-23 21:05:06 62 2018-01-23 21:05:06 64 2018-01-23 21:05:06 SNIP a lot of lines 7734 2018-07-02 20:48:37 7780 2018-07-06 18:50:37 7794 2018-07-09 08:03:45 7833 2018-07-11 15:27:06
This is on Debian 9.5 with dovecot 1:2.2.27-3+deb9u2
On 19 Jul 2018, at 00:05, Joseph Tam <jtam.home@gmail.com> wrote:
On Wed, 18 Jul 2018, Sophie Loewenthal wrote:
Why did my 'doveadm expunge' command not clear the Trash out of a mailbox?
The oldest messages was put into the Trash on the 26th June 2018 as shown in the file timestamp.
-rw------- 1 vmail mail 33056 Jun 26 16:46 1530031582.M768773P18242.mx10,S=33056,W=33510:2,RS
# doveadm -D expunge -u testuser@example.org mailbox Trash savedbefore 2d
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
# doveadm -f tab fetch -u {user} "uid date.saved" mailbox INBOX uid date.saved 94878 2018-07-18 14:53:46 100366 2018-07-18 14:53:46 [... 140 lines removed ...] 102313 2018-07-18 14:53:46 102314 2018-07-18 14:53:46 102315 2018-07-18 14:53:46
This would explain why the cron script I use to blow away old deleted mail has not fired in ages.
Is this a bug, or am I not understanding what "savedbefore" means now? It certainly has changed behaviour since <2.2, since my script used to work before.
Joseph Tam <jtam.home@gmail.com>