This site will have limited functionality while we undergo maintenance to improve your experience. If an article doesn't solve your issue and you want to ask a question, we have our support community waiting to help you at @FirefoxSupport on Twitter and/r/firefox on Reddit.

Search Support

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Rohkem teavet

Why does Thunderbird Keep Try to Compact My Folders

  • 5 vastust
  • 1 on selline probleem
  • 116 views
  • Viimati vastas Toad-Hall

more options

Error Message "The folder 'Inbox' could not be compacted because writing to folder failed. Verify that you have enough disk space, and that you have write privileges to the file system, then try again." I have over 300MB of space in the cache and am logged on in Windows as the administrator. The program keeps trying over and over to compact the folders. It is very annoying.

Error Message "The folder 'Inbox' could not be compacted because writing to folder failed. Verify that you have enough disk space, and that you have write privileges to the file system, then try again." I have over 300MB of space in the cache and am logged on in Windows as the administrator. The program keeps trying over and over to compact the folders. It is very annoying.

Valitud lahendus

mzcarol: When emails are downloaded they are written to an mbox file called 'Inbox'. 'Inbox' is a single simple text file and each time you download an email, it is written to that file, one after the other in the order downloaded, so the oldest is at the top and newest at the bottom.

So imagine it like one long text document where each email is like a new paragraph. When you delete an email, it is not removed. It is 'marked as deleted' and hidden from view, but at this point it is still in that file. So imagine you have various 'paragraphs' which you no longer want throughout that document. The act of compacting will scan through the document and remove each 'marked as deleted' paragraph and then close up the gap, so everything still reads ok.

Note that I'm talking about an mbox 'File' not a 'Folder'. This means everything is in one File. Each email is not a separate file. You have all your eggs in one basket. This is as risky as it could get.

The 'Inbox' mbox file is the most used; most accessed; gets the most activity; moving, deleteing etc than any other file.

If the Inbox file gets too large it is not so easy to open it and fix because most text editor programs expect smaller size.

If you do not compact on a regular basis to remove old marked as deleted emails, the file might suffer corruption due to poor maintenance and you risk losing everything. When compacting the select Folder Pane 'folder' which you now know is really an mbox file, a copy is created for this purpose, this requires some free space, but if the Inbox file has become too large it can cause an issue as not enough space is available. Hence, do not allow mbox files to get too large, especially ones wchich get a lot of activity like the Inbox. Info on nstmp files:

If an Anti-virus product scanned the 'Inbox' file and thought something was wrong with a small section, you risk the entire file being lost. Anti-virus products are notorious for not being able to understand that the mbox file contains several emails and not only one.

Good advise on how to maintain a healthy Thunderbird:


Opening smaller files is quicker and easier than large ones. Spreading emails between several files is less risky.

Loe vastust kontekstis 👍 1

All Replies (5)

more options

Answered in this question, https://support.mozilla.org/en-US/questions/1219120


but added here just in case: RE: Inbox cannot compact message

You appear to have allowed your Inbox to become so huge it is not possible to run compact folder on the Inbox to remove all 'marked as deleted' messages. There is not enough space to duplicate the Inbox to create an nstmp file necessary for compacting.

  • Create some folders.
  • Move all good emails out of the 'Inbox' folder into suitable folders for organising and storage.
  • Delete any you do not want.
  • When Inbox is empty, right click on folder and select 'Compact'.

I would also recommend you regulary compact the 'Inbox' and 'Junk/Spam' folder to remove all 'marked as deleted' emails and regain space in thoe mbox files.

The 'Inbox' is best used for new incoming messages and messages you need to repond/deal with, but do not use Inbox as a general store.

Usually, you do not need to move all emails out of the Inbox in order to compact the folder, but as your folder is so large, it is unknown if any corruption has occurred and so to be safe and not lose emails, I recommended moving all good and wanted mail out of the Inbox first.

more options

I'm not sure I understand the difference between storing old emails in the inbox vs storing in another area. Don't they take up the same amount of space?

Carol Baujan

more options

Valitud lahendus

mzcarol: When emails are downloaded they are written to an mbox file called 'Inbox'. 'Inbox' is a single simple text file and each time you download an email, it is written to that file, one after the other in the order downloaded, so the oldest is at the top and newest at the bottom.

So imagine it like one long text document where each email is like a new paragraph. When you delete an email, it is not removed. It is 'marked as deleted' and hidden from view, but at this point it is still in that file. So imagine you have various 'paragraphs' which you no longer want throughout that document. The act of compacting will scan through the document and remove each 'marked as deleted' paragraph and then close up the gap, so everything still reads ok.

Note that I'm talking about an mbox 'File' not a 'Folder'. This means everything is in one File. Each email is not a separate file. You have all your eggs in one basket. This is as risky as it could get.

The 'Inbox' mbox file is the most used; most accessed; gets the most activity; moving, deleteing etc than any other file.

If the Inbox file gets too large it is not so easy to open it and fix because most text editor programs expect smaller size.

If you do not compact on a regular basis to remove old marked as deleted emails, the file might suffer corruption due to poor maintenance and you risk losing everything. When compacting the select Folder Pane 'folder' which you now know is really an mbox file, a copy is created for this purpose, this requires some free space, but if the Inbox file has become too large it can cause an issue as not enough space is available. Hence, do not allow mbox files to get too large, especially ones wchich get a lot of activity like the Inbox. Info on nstmp files:

If an Anti-virus product scanned the 'Inbox' file and thought something was wrong with a small section, you risk the entire file being lost. Anti-virus products are notorious for not being able to understand that the mbox file contains several emails and not only one.

Good advise on how to maintain a healthy Thunderbird:


Opening smaller files is quicker and easier than large ones. Spreading emails between several files is less risky.

more options

Thank you so much … this has been really helpful because you explain things so well. I really love working in Thunderbird, but there are MANY things I don't have a clue about! So, as I understand this, if I first go back and archive a lot of what's in my Inbox and delete a lot of other "stuff" (my Inbox has about 1800 in it right now, so I have a way to go), then the compacter will just take out everything that's been deleted? Kind of like emptying the trash? The other day, I deleted about 1,000 and then emptied the trash. Where does that all go? And what about the disgusting "Bulk" mail? Should I just empty that whole file? You've convinced me to allow the compacting … just want to make sure I understand it. Thank you so much! CarolB

more options

Junk or Spam folder should be emptied to remove emails. This marks them as deleted. Then compact that folder to remove all those hidden marked as deleted emails.

The reason emails get marked as deleted and hidden means if you delete in error, it is still possible to recover them. Once you compact the folder, you cannot recover them. But it is a good idea to compact on a regular basis to maintain a healthier file. This is partuculary important on the Inbox and Junk/Spam folders as they usually get the most activity.

If you have not compacted in a while and you are concerned that you may have a corrupted file which you are not aware of at this point in time. Note: compacting a corrupted file could cause loss of good emails.

for example: Inbox

  • Move all good emails into other suitable folders for storage.
  • Delete anything you do not want.
  • When 'Inbox' is empty, right click on 'Inbox' and select 'Compact'.

Usually, you not need to completely empty the 'Inbox' before compacting, but if there is a lot of hidden marked as deleted emails and compacting is not something you have done in a long time, it may not be worth the risk. But that is up to you.