Michael Wessel
2012-Jul-15 03:34 UTC
[Dovecot] expire-tool stops on first box with nothing to expire in it
Hi, I'm running dovecot 1.2.11 on Centos and have the expire plugin enabled. I've had this in place for some time but until now never actually ran the expire-tool. I'm now trying to put this to use. The expire plugin as such is working fine and also the tool is working fine - up to a point. When I run it with --test it goes through a bunch of boxes and lists the messages it would expunge and the new date being logged at the end. As soon as it hits the first box that has nothing in it that's expired however, it stops and goes no further. As an example here are the last two lines of the output when I just ran it: Info: user at domain.com/Trash: timestamp 1342320464 (Sat Jul 14 19:47:44 2012) -> 1342937319 (Sat Jul 21 23:08:39 2012) Info: nextuser at domain.com/Trash: stop, expire time in future: Sat Jul 14 20:41:49 2012 If I run it again after the indicated expire time it will now also go through the nextuser at domain.com but then again stop as soon as it encounters another user with nothing to expire. As far as I can tell the same happens when I actually run the tool. Harder to tell of course as there is no output, but I can tell that not all boxes are expunged as they should be. Any ideas why this would be? Any way to get debug logging on this? Michael
Robert Schetterer
2012-Jul-15 06:14 UTC
[Dovecot] expire-tool stops on first box with nothing to expire in it
Am 15.07.2012 05:34, schrieb Michael Wessel:> Hi, > > I'm running dovecot 1.2.11 on Centos and have the expire plugin enabled. > I've had this in place for some time but until now never actually ran > the expire-tool. I'm now trying to put this to use. > > The expire plugin as such is working fine and also the tool is working > fine - up to a point. > > When I run it with --test it goes through a bunch of boxes and lists the > messages it would expunge and the new date being logged at the end. As > soon as it hits the first box that has nothing in it that's expired > however, it stops and goes no further. As an example here are the last > two lines of the output when I just ran it: > > Info: user at domain.com/Trash: timestamp 1342320464 (Sat Jul 14 19:47:44 > 2012) -> 1342937319 (Sat Jul 21 23:08:39 2012) > Info: nextuser at domain.com/Trash: stop, expire time in future: Sat Jul 14 > 20:41:49 2012 > > If I run it again after the indicated expire time it will now also go > through the nextuser at domain.com but then again stop as soon as it > encounters another user with nothing to expire. > > As far as I can tell the same happens when I actually run the tool. > Harder to tell of course as there is no output, but I can tell that not > all boxes are expunged as they should be. > > Any ideas why this would be? Any way to get debug logging on this? > > Michael1.2.11 is outdated you should upgrade 2.1.8 and try again however 1.2.17 is latest patch level for 1.2 -- Best Regards MfG Robert Schetterer
Joseph Tam
2012-Jul-19 01:24 UTC
[Dovecot] expire-tool stops on first box with nothing to expire in it
Michael Wessel writes:> When I run for example: > > doveadm -D search -A mailbox Trash savedbefore 60d > /tmp/discardI previously observed that the "date.saved" field (tested by savedbefore) seems to be clustered around particular timestamps. Dumping out this field using doveadm -ftab fetch -A \ "mailbox date.saved" \ \( mailbox Trash OR mailbox Junk OR mailbox "Deleted Items" \) it seems the timestamps do not actually correspond to when the client moves messages to their trash folder, but rather, to the time I query for it i.e. a query instantiates this value. This timestamp is then retained. In practice, if this query is done on a periodic interval (e.g. daily), the date.saved will be roughly correct, and is usable as an age test for expungement. Is there a way to force this value to be cached when the client actually saves or moves a message? Joseph Tam <jtam.home at gmail.com>
Joseph Tam
2012-Jul-30 23:08 UTC
[Dovecot] expire-tool stops on first box with nothing to expire in it
Timo Sirainen writes:> > In practice, if this query is done on a periodic interval (e.g. daily), > > the date.saved will be roughly correct, and is usable as an age test > > for expungement. > > > > Is there a way to force this value to be cached when the client actually > > saves or moves a message? > > Done for save: http://hg.dovecot.org/dovecot-2.1/rev/c598f76eeeed > > Fixed copy: http://hg.dovecot.org/dovecot-2.1/rev/b13b8267999d > > It still doesn't add it to cache if it's not already cached in both the > source and destination mailbox, but usually it should be after initial > doveadm run.Thanks, Timo. Joseph Tam <jtam.home at gmail.com>