doveadm expunge -u user@example.com mailbox Trash 'SEEN'

Category: Mail Servers & Postfix

doveadm expunge -u user@example.com mailbox Trash 'SEEN'

Permanently delete read messages from Trash

Irreversibly removes messages matching the search query, here every read message in Trash, so double-check the match with `doveadm search` first. Expunge is final and bypasses the trash can. Use `savedbefore 2w` to target only old mail.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.