More Examples with DOVEADM

Here is just an unsorted list of useful doveadm commands that could be useful.

doveadm quota

The quota get and quota recalc1 commands are used to display or recalculate the current user's quota usage. The reported values are in kilobytes.

To list the current quota status for a user / mailbox, do:

doveadm quota get -u ''

To list the quota storage value for all users, do:

doveadm quota get -A |grep "STORAGE"

Recalculate a single user's quota usage:

doveadm quota recalc -u ''

The doveadm search2 command is used to find messages matching your query. It can return the username, mailbox-GUID / -UID and message-GUIDs / -UIDs.

To view the number of messages, by user, in their .Trash folder:

doveadm search -A mailbox 'Trash' | awk '{print $1}' | sort | uniq -c

Show all messages in a user's inbox older then 90 days:

doveadm search -u '' mailbox 'INBOX' savedbefore 90d

Show all messages in any folder that are older then 30 days for

doveadm search -u '' mailbox "*" savedbefore 30d