So as part of my daily mailbox maintenance I have the following command:

        doveadm expunge -A DELETED

i.e- I’m only expunging messages that have been specifically marked as deleted. 
I also only do this *after* running doveadm purge, as this means that there is 
at least a 24 hour window between a message being marked as deleted, and it 
being gone forever.

However I get the following error message:

        Fatal: expunge: To avoid accidents, search query must contain MAILBOX 
in all search branches

While I can see the logic in this, it isn’t an accidental use of this command, 
so who do I force it to proceed?

Going forward I’d like to recommend that expunge -A DELETED should be allowed, 
as it doesn’t seem like an especially dangerous form of the command, 
particularly with mdboxes where the messages won’t be removed until the purge 
step. Either that or there should be a flag to force the command when you know 
it isn’t an accident; anyone adding this to all their queries deserves the 
damage they inflict =)

Reply via email to