IMAP: Understanding Your Mailbox Folders
When you open your mailbox, you see a list of folders down the side: Inbox, Sent, Drafts, and maybe a few folders you created yourself. This organization isn't specific to your mail client (Thunderbird, Outlook, the app on your phone): it comes from the server, via the IMAP protocol. Understanding how IMAP organizes these folders helps you avoid unpleasant surprises when transferring or backing up a mailbox.
What is an IMAP folder?
In IMAP, a mailbox is a collection of folders (the spec calls them "mailboxes", which is confusing since it's also the name for the mailbox itself). Each folder contains messages, and a folder can contain sub-folders, forming a tree. The server is the single source of truth: whether you check your mail from a browser, a phone, or a desktop client, you always see the same tree, because it lives on the server, not on your device.
The folders you find almost everywhere
Nearly every mailbox exposes a common set of folders:
- INBOX: the inbox. It's the only folder name actually standardized by IMAP (uppercase, case-insensitive); every other folder name is chosen by the provider.
- Sent: a copy of the messages you've sent, usually filed automatically by the server or the client.
- Drafts: messages still being written, not yet sent.
- Trash: deleted messages, often purged automatically after a delay.
- Junk / Spam: messages the provider's filter flagged as unwanted.
Most providers have these folders, but their exact name varies: Gmail uses [Gmail]/Sent Mail, [Gmail]/Trash, or [Gmail]/All Mail (which actually contains everything, including the inbox, because of Gmail's label system); Outlook or a generic IMAP server will name these folders differently. That's why a "Sent" folder at one provider doesn't always correspond, word for word, to a same-named folder at another.
Special folders and hierarchy
Beyond the common set, IMAP lets you organize folders into a tree, with a separator character (a dot . or a slash /, depending on the server) between each level. You could have a Clients folder containing Clients/2025 and Clients/2026, nested as deep as you need.
Some servers also flag folders with a special role through a mechanism called "special-use" (\Sent, \Drafts, \Trash, \Junk, \All, \Archive): a compatible mail client can then show the right folder in the right place, even if its real name is unusual. Not every server implements this, which is why some tools just guess based on the folder's name.
Why folders complicate a transfer or a backup
This diversity of names and hierarchies is the main source of complexity when you want to copy a mailbox to another one, or make a full backup of it. A tool that simply copies "the Sent folder" risks missing sent messages if they actually live in [Gmail]/Sent Mail, or duplicating messages if All Mail is treated as a normal folder when it actually overlaps every other one.
A faithful copy has to reproduce the full folder tree exactly as it exists on the source server, folder by folder, rather than only copying a few "usual" folders. That's what MailSync's mailbox transfer tool does: it reads the real list of folders on your source mailbox and recreates the same structure on the destination side, without relying on names assumed to be universal.
Checking your folders before acting
Before a transfer or a backup, it's useful to know exactly what your mailbox contains: how many folders, which ones, and how many messages in each. That's exactly what the mailbox tester does: it connects read-only with your IMAP credentials and shows you the full list of detected folders, with their size. This lets you spot, ahead of time, a large folder, an unexpectedly named folder, or a deep hierarchy, before launching a heavier operation like a full transfer.
Understanding this mechanic isn't a technical detail reserved for system administrators: it explains why two "equivalent" mailboxes can behave differently during a migration, and why checking your folders beforehand saves time.