Restore Lost Folder in Mozilla Thunderbird

Missing messages folders is one of the problems that Mozilla Thunderbird users sometimes encounter. Usually, files storing messages from the disappeared folder are not deleted anywhere and are still stored on the PC's hard drive. Thunderbird just doesn't "see" them. In this article we will describe how to recover lost folders, as well as give recommendations on how to prevent the loss of folders.


Where are message folders stored in Thunderbird?

Thunderbird stores all the data in one directory on a hard drive called Profile. The path to the profile directory is: C:\Users\UserName\AppData\Roaming\Thunderbird\Profiles\nnnnnn.default where nnnnnnnn is a random sequence of characters.

Inside the profile directory, POP accounts folders are stored in the Mail subdirectory, and IMAP accounts folders are stored in the ImapMail subdirectory. The Mail subdirectory also stores Local Folders. Inside the Mail and ImapMail directories, a subdirectory is created for each account.

The mail folder itself in Thunderbird consists of two files - the actual message file in MBOX format and the folder index file. The file name of the folder matches the name of the folder and has no extension. The index file name also matches the folder name but has the .msf extension. For example, the Inbox folder consists of two files - Inbox and Inbox.msf.


Let's say you have and this is a POP account. Then the path to the MBOX file of the Inbox folder will be as follows: C:\Users\UserName\AppData\Roaming\Thunderbird\Profiles\nnnnnn.default\Mail\\Inbox If the Inbox folder has a subfolder, then the files in this folder will be located in the Inbox.sbd directory.


Let's say the Inbox folder has a subfolder of SomeSubFolder. Then the path to the MBOX file of this subfolder will be as follows: C:\Users\UserName\AppData\Roaming\Thunderbird\Profiles\nnnnnn.default\Mail\\Inbox.sbd\SomeSubFolder

How to return a missing folder to Thunderbird

First of all, check that the folder files have not been deleted or moved:

  1. From the Mozilla Thunderbird menu, select Help -> Troubleshooting Information. Open Troubleshooting Information tab
  2. In the Troubleshooting Information tab that opens, click the Open Folder button. The Windows directory with your profile will open. Open Thunderbird profile folder
  3. Go to the subdirectory of your mail account and make sure that there are folder files.

One of the reasons for folder disappearance in the Thunderbird program can be the fact that the MBOX files of the corresponding folders are marked as Hidden. Make sure that your files are not hidden, or remove the Hidden attribute if they are. To do that, you need to change the settings in File Explorer to allow for the Hidden files and folders to be displayed:

  1. In a File Explorer window, select View -> Options -> Change folder and search options Open Folder Options dialog
  2. Select the View tab and, in Advanced settings, select Show hidden files, folders, and drives and click OK Permission to display hidden files
  3. Next, right-click on a message file (e.g. Inbox) and select Properties. Untick the Hidden box if it is ticked and click OK Removing the Hidden attribute
  4. Repeat these actions with all MBOX files that are not displayed and restart Mozilla Thunderbird

If there are no folder files, copy them from the profile backup. If there is no backup, use special software to restore folders of Thunderbird from your hard drive.

If the files are where they are supposed to be, close Mozilla Thunderbird and move the panacea.dat and global-messages-db.sqlite files from the profile directory to a different directory on the hard drive. The panacea.dat file is where Mozilla Thunderbird stores the directory tree cache. The global-messages-db.sqlite file is used for searching for emails and contacts. Corruption of either of these files may lead to a loss of folders.

Launch Mozilla Thunderbird. The new panacea.dat and global-messages-db.sqlite files will be created, and it may take some time for the emails to be indexed. You can keep using Thunderbird, but there might be delays until the creation of the global database is completed. You can monitor the indexing process by using the Activity Manager tool. To do that, select Tools -> Activity Manager in the program’s menu. Wait until the indexing is complete. Check to see if the missing folders have reappeared.

If the folder is still missing, recreate the folder.

For this:

  1. Close Mozilla Thunderbird
  2. Move existing folder files (mbox and msf) to another directory
  3. Restart Thunderbird and recreate the missing folder
  4. Copy any message to this folder
  5. Close Thunderbird and replace the files of the created folder in the profile directory with the files that you moved in step 2
  6. Launch Thunderbird, select the folder and make sure it contains messages

If you use an IMAP account, make sure that you are subscribed to the appropriate folder. To do this, right-click on the account name and select Subscribe.

How to repair a Mozilla Thunderbird folder?

This is required if some messages have disappeared from the folder. As you already know, the mail folder in Thunderbird consists of two files: an MBOX file that stores messages and an MSF file that stores index information. The MSF file is used by the program to speed up the search and access to messages. Sometimes the MSF file gets corrupted and the mail client simply "does not see" some messages in the corresponding folder even though these messages are still present in the MBOX file. To solve this problem, you need to repair the folder.

For this:

  1. From the Thunderbird menu, select File -> Offline -> Work Offline Work Offline
  2. Right-click on the folder you want to repair and select Properties
  3. On the General Information tab, click the Repair Folder button Repair Thunderbird folder
  4. Click OK

Some recommendations for avoiding folder loss in Mozilla Thunderbird mail client

Try not to give folders long names and avoid the great depth of the folder hierarchy. This is due to the fact that the maximum file path length in Windows is 260 characters (this restriction can be disabled in Windows 10).

Try not to create too many folders. This may not only cause the folders to disappear, but also cause Mozilla Thunderbird performance problems.

Related Post