lefcha/imapfilter — Issue #24: How are folders distinguished from mailboxes?
Author: veryfrankc
Created: 2012-01-06 01:21:34+00:00
State: open

I have been trying out imapfilter and tried some code I found on a blog at http://jason.the-graham.com/2011/01/10/email_with_mutt_offlineimap_imapfilter_msmtp_archivemail/.

The code prints out the mailboxes and the folders.

```lua
-- Inbox information
account1.INBOX:check_status()

-- Get and print available mailboxes and folders
mailboxes, folders = account1:list_all()
table.foreach(mailboxes,print)
table.foreach(folders,print)
```

When I run the code top level folders without sub folders are not listed as folders, but they are listed as mailboxes. When I create a new folder it does not appear in the folder listing until I create a sub folder under it, but it it is listed as a mailbox. Is this a feature of IMAP I am unfamiliar with, or does it depend on the type of IMAP server it is connecting to?