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

John Stoffel john at
Tue Jul 19 19:39:13 UTC 2022

>>>>> "Peter" == Peter  <peter at> writes:

Peter> 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?

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

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

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

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

You will run into problems if you use an iPhone to also access your
mail via IMAP as well, for some reason it marks all new email as SEEN,
even if they haven't been opened.  It's .... annoying to say the
least.  It's an iPhone issue from what I see.  The archives will have
more on this from three or four years ago when I last beat my head
against this.

Maybe it's time to fine a new iPhone mail client now that you can get
rid of the default iOS mail client if you like.

More information about the dovecot mailing list