On 29 Jan 2016, at 14:29, Timo Sirainen tss@iki.fi wrote:
\Recent flag is special and you can't add/remove it. It's not even internally stored like regular flags.
Are you certain? The following commands seem to work just fine:
doveadm flags add -A ‘\Recent’ OLD UNSEEN
doveadm search -A NEW
Before I ran the first command, the second wouldn’t return anything, so \Recent does seem to be set via doveadm flags, doveadm fetch flags also seems to confirm this.
I think what you want instead is:
doveadm expunge -A old seen savedbefore 7d mailbox Trash
While you’re right that I should probably be using saved before, I’m trying to find an alternative to this specific command because it seems like it would be possible for a message that’s 7 days old to potentially to be opened by the user such that is flagged as seen, but is actually still being read when the command is run, allowing it to be expunged before the user has a chance to do anything with it. Or is the saved before value updated when flags are changed?