This patch, against today's CVS, reflects an attempt to improve IMAP support in Balsa, to allow Balsa to manage an entire IMAP folder tree. Because IMAP allows subfolders in mailboxes, Balsa's assumption that only leaves can be mailboxes had to be dropped, and this required changes outside just the IMAP code. Balsa's treatment of parts of a tree where mailboxes do occur only as leaves should be unchanged, but I haven't been able to test this. The INBOX folder appears twice (at least in my tests with a Cyrus server), because that's the way the libmutt IMAP browser sees the tree. Other folders appear only once, functioning both as nodes with expand/collapse icons and as mailboxes. All comments and suggestions welcome. Peter
balsa-descend-imap-tree-patch.gz