Naar inhoud
lightbulb Welkom op de nieuwe kennisbank | We hebben de docs volledig vernieuwd met meer dan 160 features. Bekijk wat nieuw isarrow_forward

Thunderbird mbox corrupt? A step-by-step diagnosis

Find out whether your mbox file is really corrupt or only its index (msf) is broken, and recover your email safely and locally.

You open Thunderbird and a folder stays empty, messages have vanished, or you get an error while loading a folder. The first thought is usually: my mbox is corrupt and my email is gone. In practice that is often not the case. Very frequently the mbox file itself is perfectly fine and only the index next to it is broken. This article helps you tell the difference before you delete or overwrite anything.

We do that with a calm diagnosis instead of panic. And we do it safely: a local viewer lets you look inside the messages without changing anything, so you know for sure what is still readable.

What is an mbox, and what is an msf?

Thunderbird stores an entire mail folder in a single file with no extension, in the mbox format. All messages sit one after another in that one text file. This is the file with your real data.

Next to every mbox file there is a second file with the same name and the extension .msf (Mail Summary File). That is not email but an index: a kind of table of contents Thunderbird uses to quickly show the sender, the subject, whether a message was read, and so on. The msf is entirely derived from the mbox.

This difference is the heart of the whole diagnosis. The msf can always be regenerated, because it is only a summary. The mbox is your source, and that is what you want to protect.

info

Why this distinction matters so much

A broken msf feels exactly like lost email: empty folders, missing messages, error dialogs. But your real messages are still sitting in the mbox. Only once you make this distinction do you know whether you have a quick chore or a real recovery problem.

How do you tell which one is broken?

A few typical signals point toward an index problem rather than real corruption:

  • A folder shows zero messages while the mbox file itself is clearly large (many megabytes, for example).
  • Messages are visible but in a strange order, or the counts are wrong.
  • Thunderbird feels slow or freezes when opening exactly one folder.
  • It went wrong after a crash, a full disk, or an interrupted sync.

Signals that instead point to real damage to the mbox:

  • The mbox file is unexpectedly 0 bytes or much smaller than before.
  • Messages bleed into each other, or the content is half readable, half garbage.
  • The file lived on a drive that is itself reporting hardware errors.

These signals give you a direction but not certainty. You only get certainty when you look inside the mbox file itself, separate from Thunderbird.

Look inside the mbox first, locally and safely

The best first investigation is this: open a copy of the mbox file in a separate viewer that changes nothing about your file. If you see the messages come back neatly, your data is fine and the problem was the index. If you see nothing or only garbage, you probably have real damage, and you know that before you delete anything.

For this you use Mbox Viewer by Cloud Captains, a Chrome extension. You drag a copy of the mbox file onto the window and the messages appear in a list on the left, with the open message on the right, just as you know it from Gmail or Thunderbird. The viewer opens mbox and mbx, but also standalone .eml, .emlx, .msg, and even an mbox.gz from Google Takeout, which is unpacked automatically.

lightbulb

Privacy: everything stays on your own device

Mbox Viewer runs 100 percent locally and offline. Nothing goes to a server, there is no telemetry, and the Chrome permissions are empty. Your email is only kept in IndexedDB on your own computer, and you can wipe it later through Settings, Clear database. For people investigating corrupt or sensitive mail this is exactly what you want: you never have to upload anything. More info at https://mbox-viewer.online.

The diagnosis, step by step

Establish step by step what is broken

  1. Quit Thunderbird completely, so the program is not writing to the same files at the same time.
  2. First make a copy of the suspect mbox file and put it somewhere safe. From now on you only work with the copy, never the original.
  3. Check the file size of the original. If it is 0 bytes, that strongly suggests real data loss. If it is still substantial, your email is probably still in there.
  4. Open the Mbox Viewer extension and drag the copy of the mbox file onto the window.
  5. Check whether the message list fills up and whether you can open and read messages in the Preview tab. If so, your data is intact and the msf index is the culprit.
  6. Unsure whether a message is really intact? Open the Raw tab to see the unprocessed source text. There you can immediately tell whether the message structure is clean or whether something is running together.
  7. Write down your conclusion: index broken (data is safe) or mbox truly damaged (data partly or wholly gone). Only then do you choose the right recovery route below.

Recovery when only the index (msf) is broken

This is the lucky scenario and usually a matter of minutes. Because the msf can simply be regenerated, you let Thunderbird do it.

Have the index rebuilt

  1. Quit Thunderbird.
  2. Find the .msf file that has the same name as your mbox folder. On Windows it lives under your profile folder in AppData, on macOS in the Library folder of your profile, on Linux in your hidden .thunderbird folder.
  3. Delete or rename only the .msf file. Do not touch the mbox file without an extension.
  4. Start Thunderbird again. The program notices the index is missing and rebuilds it from the mbox.
  5. Still not working right away? Right-click the folder, go to Properties, and choose Repair Folder (Rebuild Index) to force the rebuild.
lightbulb

Rebuilding the index is harmless to your data

Because the msf is only a summary, you can throw it away without worry. Thunderbird automatically creates a fresh version from your real messages. You will not lose any email doing this.

Recovery when the mbox itself is damaged

If the viewer could not show any messages, or you only saw garbage, there is real damage. Caution matters here.

warning

Never work on your only copy

The moment you suspect an mbox is truly damaged, stop writing to that drive and work only from copies. Every new action on the original can overwrite remaining, still-readable messages. Make a second copy on another drive right away.

Much mbox damage is partial: the file starts or ends with a garbled chunk, but large parts in between are still perfectly fine. In that case a viewer can often still show a good number of messages even though Thunderbird refuses the whole folder. Whatever the viewer shows, you can deliberately rescue.

Rescue as many messages as possible from a damaged mbox

  1. Open the copy in Mbox Viewer and see which messages still load cleanly.
  2. Select the messages you want to keep with the selection key, or pick everything at once with Shift and A.
  3. Export the selection. For putting them back into a mail program an EML-ZIP or a new mbox file is handy; for readable archiving choose PDF-ZIP or HTML-ZIP.
  4. Want an overview of what you recovered? Also export the CSV metadata with sender, subject, and date per message.
  5. Import the clean mbox file or the individual eml files back into Thunderbird as a new folder, and only discard the damaged original once you are sure you have what you need.

Not sure whether a message itself is trustworthy?

Sometimes while cleaning up you discover a suspicious message, for example a mail that claims to come from your bank. Mbox Viewer has a separate Forensic tab for that, which shows per message the authentication result (SPF, DKIM, DMARC), the transport chain, and a suspicion score from 0 to 100. It recognizes signals such as name spoofing, a mismatched Reply-To address, and punycode domains. That is outside the scope of mbox recovery, but it is useful to know it is there while you are paging through your old mail anyway.

lightbulb

External images stay blocked by default

While reading, external images are not loaded by default, so tracking pixels cannot reveal that you opened an old message. You can still show them per message with a button if you want.

Keeping it from coming back

Index problems and mbox damage often come from a crash, a full disk, or force-quitting Thunderbird. A few habits help a lot.

  • Quit Thunderbird cleanly before you shut down the computer.
  • Keep enough free disk space, because a full disk during a write is a classic cause of half-written mbox files.
  • Back up your profile folder periodically, or export important folders as mbox.
  • Compact your folders now and then through the menu, so deleted messages are really cleaned up instead of lingering as garbage.
Is my email gone if Thunderbird shows an empty folder?

Not necessarily. An empty folder very often comes down to a broken index (msf), while the messages are still sitting in the mbox file. Open a copy of the mbox in a separate viewer; if you can see the messages there, your data is safe and you only need to have the index rebuilt.

What is the difference between the mbox file and the msf file?

The mbox file (no extension) holds your real email, all messages one after another. The msf file is only an index, a quick table of contents that Thunderbird can recreate itself. That is why a broken msf is almost never a disaster, while a broken mbox is.

Can I just delete the msf file?

Yes, while Thunderbird is closed. Thunderbird automatically rebuilds the index from the mbox on the next start. Just do not touch the file without an extension (the mbox), because that is your source.

Does the viewer send my mail anywhere when I investigate corrupt files?

No. Mbox Viewer by Cloud Captains runs entirely locally and offline, with no uploads, servers, or telemetry. Your messages stay in IndexedDB on your own device, and you can wipe them through Settings, Clear database. See https://mbox-viewer.online for more.

The viewer only shows some of my messages, now what?

That points to partial damage of the mbox: one chunk is broken and the rest is readable. Select the messages that do load and export them as a new mbox file or EML-ZIP. That way you rescue the readable part before you clean up the damaged original.

How do I keep my mbox from getting damaged again?

Quit Thunderbird cleanly, keep enough free disk space, and back up your profile folder regularly. Compact your folders now and then so deleted messages are truly cleared instead of left behind as loose garbage.