[Dovecot] Problem with expunge
I'm running Dovecot 2.0.8.
The other day I tested doveadm expunge on a test Inbox with a few messages received over the course of a day, and using savedbefore <a few hours>, and it seemed to work.
However, today I was testing converting some maildirs over to sdbox, and noticed odd behavior: it's deleting all messages in the specified folder instead of just the ones matching the condition I'm using ("savedbefore 4w").
The command I'm using is "doveadm -Dv expunge -A mailbox Trash savedbefore 4w"
Because of the conversion, all of the ctimes for all of the files are actually the same (basically, a few minutes ago), due to the converstion to sdbox from maildir, so I would expect that either it doesn't delete any of them or looks inside at some header of the mail (half of which was received/placed into Trash before 4w ago and half of which wasn't). I definitely don't expect full-on deletion...
Any idea what's going on?
Thanks, Jeff
On 17.12.2010, at 21.15, Jeff Mitchell wrote:
However, today I was testing converting some maildirs over to sdbox, and noticed odd behavior: it's deleting all messages in the specified folder instead of just the ones matching the condition I'm using ("savedbefore 4w").
Because of the conversion, all of the ctimes for all of the files are actually the same (basically, a few minutes ago),
dbox doesn't use ctime, but a "saved-date" metadata header. I suppose that header got set wrong in the conversion for some reason (maybe to 0 = year 1970?). You did conversion with dsync, right? I can debug this some day later..
On Dec 17, 2010 7:20 PM, "Timo Sirainen" tss@iki.fi wrote:
On 17.12.2010, at 21.15, Jeff Mitchell wrote:
However, today I was testing converting some maildirs over to sdbox, and noticed odd behavior: it's deleting all messages in the specified folder instead of just the ones matching the condition I'm using ("savedbefore 4w").
Because of the conversion, all of the ctimes for all of the files are actually the same (basically, a few minutes ago),
dbox doesn't use ctime, but a "saved-date" metadata header. I suppose that
header got set wrong in the conversion for some reason (maybe to 0 = year 1970?). You did conversion with dsync, right? I can debug this some day later..
Yes, this was using dsync.
Thanks, Jeff
participants (2)
-
Jeff Mitchell
-
Timo Sirainen