Rebuild a Mailbox in Mac Mail: What It Does and How To

The short answer
In Mail on a Mac, Mailbox > Rebuild discards the selected mailbox's local copy and downloads its messages again from the mail server. Apple documents this for IMAP and Exchange accounts, so nothing is lost while the server holds the originals. It fixes missing messages and wrong counts. It does not fix search; reindexing does.
Rebuild deletes Mail's local copy of one mailbox and re-downloads it from the server. Apple documents it for IMAP and Exchange. Steps and safety notes.
On this page
- 01What does Rebuild do in Apple Mail?
- 02Before you rebuild: check where the mailbox lives
- 03How to rebuild a mailbox in Mac Mail, step by step
- 04Rebuild vs reindex: which one do you need?
- 05Rebuild greyed out or messages not coming back?
- 06Rebuild on iPhone and iPad
- 07A different approach to recurring sync problems
What does Rebuild do in Apple Mail?#
Rebuild is a command in Mail's Mailbox menu. You select one mailbox in the sidebar and choose Mailbox > Rebuild. Apple's Mail User Guide says that for IMAP or Exchange accounts, the messages and attachments stored on your Mac are discarded and then downloaded again from the mail server, and the mailbox appears empty until the download is complete.
Apple's own examples of when to use it: messages appear to be missing or garbled, or you cannot find all the relevant messages when you search using the Entire Message option. Counts that no longer match the server and bodies that will not load fall into the same family. iCloud Mail accounts use IMAP, so they follow the same behaviour.
There is no Option-key trick. The command sits in the Mailbox menu like any other item. The steps below were checked against Apple's guide for macOS Sequoia, and Mac write-ups for macOS Tahoe 26 list the same menu path. If the item looks different on macOS 27, check the Mail User Guide for your version.
- IMAP, Exchange and iCloud mailboxes: the server keeps the originals, so Rebuild only refreshes the copy on your Mac.
- On My Mac mailboxes: there is no server copy. Apple's page does not describe what Rebuild does to them, so export them first and treat the export as your backup.
- One mailbox at a time: wait for each rebuild to finish before starting the next.
Before you rebuild: check where the mailbox lives#
Look at the sidebar. A mailbox listed under your Gmail, iCloud or Exchange account name is mirrored on a server. A mailbox listed under On My Mac exists only on this computer, so the local copy is the only copy.
I could not find an Apple page that explains what Rebuild does to an On My Mac mailbox, so I will not tell you it is safe or unsafe. The cautious route costs a minute: select the mailbox, choose Mailbox > Export Mailbox, save the file outside your Mail folder, and open it once to confirm it works. The full export walkthrough is in export an Apple Mail mailbox to mbox.
POP3 accounts are a separate case. Apple's page names IMAP and Exchange only. If a POP3 account removes messages from the server after download, whatever is no longer on the server cannot come back from a re-download, so export first there too.
Back up On My Mac mailboxes first
How to rebuild a mailbox in Mac Mail, step by step#
The menu path is Mailbox > Rebuild on macOS Sequoia and, per Tahoe 26 write-ups, on Tahoe as well. The labels on older versions such as Ventura and Sonoma match.
- 1
Select the mailbox in the sidebar
Click the specific mailbox where the problem shows up: Inbox, Sent, a folder, a Gmail label. Rebuild acts on the one you selected, so repeat the steps for each broken mailbox, one after the other.
- 2
Choose Mailbox > Rebuild in the menu bar
Apple's guide describes no confirmation step. The mailbox looks empty or reduced while the messages download again. That is the documented behaviour for IMAP and Exchange, not data loss.
- 3
Leave Mail open until the download finishes
Do not quit Mail or let the Mac sleep mid-download if you can avoid it. Watch the mailbox refill. When the count stops changing, open a few messages to confirm the bodies load.
- 4
If one account is still wrong, remove and re-add it
Open Mail > Settings > Accounts, remove the account, restart Mail, then add it again. For IMAP and Exchange accounts the mail stays on the server. Do this only after Rebuild has not helped, and never for an account that holds the only copy of something.
Apple gives no download time, and it depends on mailbox size and your connection. A large mailbox with years of mail and attachments takes much longer than a small folder. Mail fills the mailbox progressively, so search results can be incomplete until the download is done.
Rebuild vs reindex: which one do you need?#
Rebuild replaces the messages Mail stores for one mailbox. Reindexing rebuilds the Spotlight search index over messages that are already on your Mac and does not touch the messages themselves. If everything displays correctly but search misses mail, reindexing is the lighter fix. Our guide to reindexing Mail on your Mac has the steps.
Use the table to pick the first thing to try. If several things are wrong at once, start with the lightest fix that matches the main symptom.

| What you see | Try first | Why |
|---|---|---|
| Wrong unread count, or message bodies will not load | Rebuild the mailbox | The local copy has drifted from the server; Rebuild downloads it again |
| Messages show normally but search misses them | Reindex the Spotlight index | The messages are fine; the search index over them is stale |
| Only one account is broken | Remove and re-add that account (IMAP or Exchange) | Isolates the problem to a single account connection |
| Messages are missing in webmail too | Check the server or provider, not Mail | A rebuild only re-downloads what the server still has |
| Mail is slow or not syncing at all | See the sync checklist | That is usually a connection or account problem; see [Apple Mail slow or not syncing](/blog/apple-mail-slow-or-not-syncing-mac) |
Rebuild greyed out or messages not coming back?#
Most failed rebuilds trace back to a short list of causes. Work down it in order.
- Rebuild is greyed out: Select a normal mailbox in the sidebar first, such as Inbox, Sent or a folder you created. Smart Mailboxes are built from searches, which is a likely reason the command is unavailable for them. I cannot point to an Apple page that says so, so if it stays greyed out on a regular mailbox, quit and reopen Mail and try again.
- Messages are still missing after the rebuild: Check the account in webmail (Gmail, Outlook.com or iCloud.com). If they are not there, the problem is on the server and Rebuild cannot restore them. If they are there, try removing and re-adding the account.
- The count is still wrong: Quit Mail, wait a minute, reopen it and compare with webmail. If the messages match but search is off, move to a reindex.
- Mail put messages in Recovered Messages: Apple has a separate help page for that mailbox. Check it before you assume mail is gone.
Rebuild on iPhone and iPad#
The iPhone and iPad Mail app has no Rebuild command. The closest step is to remove the account and add it again, which makes the device download its mail from the server fresh. In the current iOS guide the path is Settings > Apps > Mail > Mail Accounts, then tap the account and choose Sign Out or Delete Account. On iOS 17 and earlier the same screen is Settings > Mail > Accounts.
Apple does not describe this as a rebuild, and it is heavier than the Mac command, so treat it as a last resort. Anything stored only on the device and not on the server could be lost. Apple also notes that deleting an account removes it from your iPhone but does not close it with the provider. iCloud.com and other webmail read straight from the server, so there is no local copy to rebuild.
A different approach to recurring sync problems#
If you rebuild often, or you juggle several accounts that keep drifting, the cause may be Mail's local database rather than any one mailbox. AI Emaily does not repair Apple Mail. It is a separate client that connects Gmail, Outlook and Microsoft 365, iCloud and other IMAP accounts without depending on Mail's local database on your Mac.
It syncs about the last 60 days of mail when you connect an account, then everything new, and its search and AI work over that synced copy. There is a 7-day free trial on Pro and Autopilot; see pricing for the current plans.
Frequently asked
See it in AI Emaily
Keep reading
Sources

Written by
Nafiul HasanNafiul Hasan is an entrepreneur and AI automation system builder with 10+ years of experience turning messy, manual workflows into reliable automated systems. He designs and ships AI enterprise solutions end-to-end — the agent logic, the data plumbing, and the product people actually use — and founded AI Emaily to give busy professionals their attention back. He writes here from the builder's seat: what works, what breaks, and how to put AI to work without giving up control.