Hi all, I use a Dovecot IMAP server on my Linux desktop computer, and I'm pretty good at writing shellscripts. Is there any way I could use doveadm or other tools to create a report that shows all my folders in a hierarchy? Also, is there a way to show only those with new mail? Thanks, SteveT Steve Litt Summer 2022 featured book: Thriving in Tough Times http://www.troubleshooters.com/bookstore/thrive.htm
Are you using maildrop or flat files In your config? If you are using maildrop where there is a file for each file then you could use free into the folder new but I do not know what config you have check tre command and see if that does some of what you want.> Il giorno 18 lug 2022, alle ore 20:20, Steve Litt <slitt at troubleshooters.com> ha scritto: > > ?Hi all, > > I use a Dovecot IMAP server on my Linux desktop computer, and I'm > pretty good at writing shellscripts. Is there any way I could use > doveadm or other tools to create a report that shows all my folders in a > hierarchy? Also, is there a way to show only those with new mail? > > Thanks, > > SteveT > > Steve Litt > Summer 2022 featured book: Thriving in Tough Times > http://www.troubleshooters.com/bookstore/thrive.htm
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
> On 19/07/2022 06:18 EEST Steve Litt <slitt at troubleshooters.com> wrote: > > > Hi all, > > I use a Dovecot IMAP server on my Linux desktop computer, and I'm > pretty good at writing shellscripts. Is there any way I could use > doveadm or other tools to create a report that shows all my folders in a > hierarchy? Also, is there a way to show only those with new mail? > > Thanks, > > SteveT > > Steve Litt > Summer 2022 featured book: Thriving in Tough Times > http://www.troubleshooters.com/bookstore/thrive.htmdoveadm -fjson mailbox status -u user unseen "*" Aki
On 2022-07-18 11:18 p.m., Steve Litt wrote:> I use a Dovecot IMAP server on my Linux desktop computer, and I'm > pretty good at writing shellscripts. Is there any way I could use > doveadm or other tools to create a report that shows all my folders in a > hierarchy? Also, is there a way to show only those with new mail? >you could use "doveadm mailbox list" to build the list of folders and "doveadm search" to search each folder for appropriate IMAP flags https://wiki2.dovecot.org/Tools/Doveadm/SearchQuery e.g. doveadm mailbox list -u username | sort doveadm search -u username mailbox foldername UNSEEN (or NEW instead of UNSEEN)