#16 folder collection behavior with dual-use mailboxes


This is from MRC. This one may be easy to change, since it's probably a matter of deleting code.

Consider a folder collection on the server defined as "[]" (thus all mailboxes). The server returns the following:

* LIST (\HasNoChildren) "/" boxA
* LIST (\HasChildren \NoSelect) "/" dirB
* LIST (\HasNoChildren) "/" INBOX
* LIST (\HasChildren) "/" boxC

In the Alpine FOLDER LIST view, we will see:

INBOX/ boxA[/] dirB/ boxC[/]

Since boxA and boxC are displayed identically, it appears that Alpine doesn't pay any attention to the children attributes. I'm pretty sure that I added support for children attributes in later versions of UW IMAP; they'd be called LATT_HASCHILDREN and LATT_HASNOCHILDREN.

However, the listing for INBOX is bizarre. I'm guessing that there is explicit code in Alpine to make it impossible to access INBOX as a mailbox in a top-level folder collection, because if the folder collection is #mail/[] we get

* LIST (\HasNoChildren) "/" #mail/boxA
* LIST (\HasChildren \NoSelect) "/" #mail/dirB
* LIST (\HasNoChildren) "/" #mail/INBOX
* LIST (\HasChildren) "/" #mail/boxC

and we get the expected FOLDER LIST view:

INBOX[/] boxA[/] dirB/ boxC[/]

I never understood why Alpine (and Pine before it) felt that it was so important to exclude INBOX from a top-level folder collection list. Apparently the presumption is that the INBOX would be listed in incoming-folders, but that is not guaranteed to be the case.


  • Hmm it seems like I found the relevant bit but commenting it out doesn't solve it...

    1271 if(this_inbox_is_primary_inbox){
    1272 /*
    1273 * Don't add a folder for this, only a directory if called for.
    1274 * If it isn't a directory, skip it.
    1275 */
    1276 if(!(delim && !(attribs & LATT_NOINFERIORS)))
    1277 return;
    1279 suppress_folder_add++;
    1280 }

    I also found out something odd... on one imap server(same server just diff domain) it shows both INBOX[.] but on the other diff domain same server it shows INBOX. I don't get it why it would be different.... A third domain on the same server agani shows only INBOX.

  • OK Got it sorted... there were a few locations... I think I didn't break anything...

    Git commit: 2f0ac6b