docker compose -f /opt/mailcow-dockerized/docker-compose.yml exec dovecot-mailcow doveadm expunge -u user@example.com mailbox Trash ALL

Category: Mail Servers & Postfix

docker compose -f /opt/mailcow-dockerized/docker-compose.yml exec dovecot-mailcow doveadm expunge -u user@example.com mailbox Trash ALL

Permanently delete all mail in a mailbox folder

doveadm expunge removes messages matching the given search, here every message in Trash, and deletion is immediate and irreversible. Add a date filter such as BEFORE 01-Jan-2026 to keep recent mail. Test with doveadm search using the same criteria first.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.