0

I would have thought that this would be a FAQ but I haven't found a useful answer.

How do I expunge all email messages deleted using the email client regardless of which folder it's in?

  • using [`doveadm`](https://wiki.dovecot.org/Tools/Doveadm/Expunge) this is easy. For a user this question is better suited for [su]. – Gerald Schneider Nov 23 '22 at 12:56
  • Thank you for coming back to me. I did think that doveadm was the answer, although I could not find any reference to help with the search criteria. Thank you for pointing me to Super User. I will look at that – Gary Stainburn Nov 24 '22 at 13:20
  • I restored the answer I wrote originally. I deleted it because I thought I misread your question. – Gerald Schneider Nov 24 '22 at 14:09

1 Answers1

0

From a quick glance at the manual, this should do it:

doveadm expunge ALL

This would affect all mailboxes.

To adapt an example from the search-query manual:

doveadm expunge mailbox-guid 44f68b13ce97044b837f000035ca9452 ALL

This would only affect a single mailbox.

Gerald Schneider
  • 23,274
  • 8
  • 57
  • 89
  • **Danger:** That search query does not include a filter for messages flagged as deleted yet. – anx Nov 27 '22 at 23:23