> On October 7, 2016 at 4:13 PM "@lbutlr" <krem...@kreme.com> wrote: > > > On 05 Oct 2016, at 23:50, Aki Tuomi <aki.tu...@dovecot.fi> wrote: > >> On October 6, 2016 at 8:05 AM "@lbutlr" <krem...@kreme.com> wrote: > >> > >> > >> I’d like to know if there is a way to tell dovecot to > >> > >> 1) move messages older than # days to the Archive folder > >> 2) rebuild the indexes > >> 3) remove any folders that are left with no mail > >> > >> Preferably, I’d like this to be a action I an schedule via crontab or > >> something to fire off for any users that want it. So, I do not want it to > >> do this across all users and mailboxes. > > > > Have you tried doveadm move? > > I don’t see anything in doveadm move that supports the age of the message. at > least according to doveadm-move (and buy, that was fun o find since it is not > mentioned anywhere in man doveadm unless you notice the (1) might indicate a > man page!) it only supports dates, which makes simply doing this in a crontab > (or something similarly straightforward) more problematic since I would have > to generate a date string. > > Ah, wait, I just found the DATE SPECIFICATION section of doveadm-search-query. > > Nothing quite like having three man pages to get useful information on one > command. > > Thanks for the forcing me to look again though. > > doveadm move -u jane Archive mailbox INBOX BEFORE 30d > > And then I have to do that for all folders one at a time, yes?
doveadm move -u jane Archive ALL BEFORE 30d ? Aki