MBF Knowledge Base

How do I delete old emails from Dovecot?

There is a useful tool called doveadm that will allow you to perform various administrative tasks with messages.

The following command is an example you can use to delete messages from specific folders that are older:

doveadm expunge -A mailbox Trash savedbefore 62d