Hi all,
Smart Mailboxes disappeared one day randomly (I think is due to iCloud-Document and Data Sync), or when creating new smart folders. If that is the case, I have checked these two files and discovered the following:
SyncedSmartMailboxes.plist
SmartMailboxesLocalProperties.plist (no change required in this file)
I found that the data and filter rules are all intact, what is causing it not to show is due that the value for "mailbox type" is incorrect.
Close Mail,
Open up SyncedSmartMailboxes.plist,
for more technical savvy people (can do a find/replace), ensure this for relevant mailboxes:
<key>MailboxName</key>
<string>mailboxname</string>
<key>MailboxType</key>
<integer>0 or 7</integer>
7 - top level smart mailbox/folder
0 - sub level smart mailbox/folder
FYI:
<key>IMAPMailboxAttributes</key>
<integer>1 or 2 or 17 or 18</integer>
17-top/mailbox
18-top/folder
1-sub/mailbox
2-sub/folder
*sub - any level that is non-top,
One of my smart mailbox within a smart folder has its <key>MailboxType</key> set as 7, which is incorrect. That's why it "disappeared" in mail osx.
By changing it to '0', the smart mailbox reappear upon mail launch.