I created an empty IMAP account and added it to Mail.app and Notes.app on my Mac running OS X Mountain Lion. After saving some messages, all default folders were created by Mail.app. Then I connected to the IMAP server using Terminal and listed all folders:
A1 LIST "" "%"
* LIST (\HasNoChildren) "." "Sent Messages"
* LIST (\HasNoChildren) "." "Junk"
* LIST (\HasNoChildren) "." "Archive"
* LIST (\HasNoChildren) "." "Deleted Messages"
* LIST (\HasNoChildren) "." "Notes"
* LIST (\HasNoChildren) "." "Drafts"
* LIST (\HasNoChildren) "." "INBOX"
A1 OK List completed.
As you can see in the raw output, the exact default folder names are as follows:
- INBOX
- Drafts
- Sent Messages
- Junk
- Deleted Messages
- Archive
- Notes
After updating my email server to create these folder for new IMAP accounts by default, I connected a new account to my Mac. As hoped, Mail.app and Mail on iOS automatically used these special folders (I only had to enable "Store junk messages on the server" on Mac).
For those using Dovecot as well, this is the resulting configuration file with the default folders included (/etc/dovecot/conf.d/15-mailboxes.conf
):
namespace inbox {
mailbox Drafts {
auto = subscribe
special_use = \Drafts
}
mailbox "Sent Messages" {
auto = subscribe
special_use = \Sent
}
mailbox Junk {
auto = subscribe
special_use = \Junk
}
mailbox "Deleted Messages" {
auto = subscribe
special_use = \Trash
}
mailbox Archive {
auto = subscribe
special_use = \Archive
}
mailbox Notes {
auto = subscribe
}
}