Tools to get a report of which folders have new mail?

Peter peter at pajamian.dhs.org
Tue Jul 19 04:33:50 UTC 2022


On 19/07/22 3:18 pm, Steve Litt wrote:
> Is there any way I could use
> doveadm or other tools to create a report that shows all my folders in a
> hierarchy?

See doveadm(1) and doveadm-mailbox(1), specifically the `doveadm mailbox 
list` command.

> Also, is there a way to show only those with new mail?

Look at doveadm-search(1) and doveadm-search-query(7) for this.

You can loop through the list of mailboxes from doveadm mailbox list and 
pass them one at a time to `doveadm search NEW MAILBOX mailboxname` to 
see if any messages are returned from the search.


Peter


More information about the dovecot mailing list