Dovecot‘s administration utility can be used to manage various parts of Dovecot, as well as access users’ mailboxes. Here’s a list of some commonly used commands.
- Show all messages older then 30 days in user matt’s Inbox
doveadm search -u matt mailbox INBOX savedbefore 30d
- Expunge (delete) all messages older then 7 days in matt’s Trash folder
doveadm expunge -u matt mailbox Trash savedbefore 7d
- List current quota status for a user (-u) or all users (-A)
doveadm quota get -u matt