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.

Learn More

discrepancy between Thunderbird compacted folders & real size on disk

  • 12 cavab
  • 1 has this problem
  • 38 views
  • Last reply by Val

more options

Hiya

I have 2 out of 5 mail accounts were the trash-folders are less than 30 Mb according to Thunderbird - [right mouse click] on the folders & pick [properties]

BUT on the disk inside the [ImapMail] folder I have files named [Trash] that for the 2 accounts have a combined total size of 600 Mb ! :(

And YES !!! I let Thunderbird compact per auto ALL the time (when it will save = 10 Mb in total)


So either; - I've COMPLETELY misunderstood 'something' - or there's something to look into for Mozilla ? :)

THANKS in advance for your time, help & reply ! :) Best Regards Peter Valentin

Hiya I have 2 out of 5 mail accounts were the trash-folders are less than 30 Mb according to Thunderbird - [right mouse click] on the folders & pick [properties] BUT on the disk inside the [ImapMail] folder I have files named [Trash] that for the 2 accounts have a combined total size of 600 Mb ! :( And YES !!! I let Thunderbird compact per auto ALL the time (when it will save = 10 Mb in total) So either; - I've COMPLETELY misunderstood 'something' - or there's something to look into for Mozilla ? :) THANKS in advance for your time, help & reply ! :) Best Regards Peter Valentin

All Replies (12)

more options

IMAP requires an IMAP expunge server side to do what a simple compact does on a POP mail account. Generally Thunderbird issues an expunge with a compact of IMAP accounts and also on exit for the inbox. But the expunge on exit needs to be selected and I have seen folk disable it because they do not know what it is. I also see a lot of folk with failed compacts because their antivirus gets in on the process and causes failure before completion. This usually leaves NSTMP folders in the all folders view, but not always.

So if your compacts are working I have no real Idea. but I am guessing the expunge part of the process is not. One way to check is to turn on just mark it as deleted in account settings and see if your folders are full of deleted mail with a strikethrough.

more options

Hiya Matt

THANK you for responding ! :)


Changing account settings to »Just mark it as deleted« did not 'reveal' a lot of old mails - so that's not a 'work-around'


I would have answered you much more quickly but there's been some errors on this site - as well - preventing one to post here :(

more options

Val said

I would have answered you much more quickly but there's been some errors on this site - as well - preventing one to post here :(

Yes, there were some problem over the weekend and into Monday+Tuesday. They have since been resolved.

more options

What happens if you do a manual compact on one of the 'Trash' folders?

  • Right click on Trash folder and select 'compact'.

Do not select anything or delete anything whilst you perform this test.

re :trash-folders are less than 30 Mb according to Thunderbird

Yes, I recently noticed there has been a change in the code and it's not helpful. Previously in version 102.15.1, the 'Folder Pane Columns' option 'Size' used to show the actual folder size as also seen in the profile folders. Now, in the new 'Folder Pane Header' option 'Show Folder Size', it shows the Size as according to total size of emails have not been deleted or moved - aka just those listed in the Message List when all are displayed.

This meant that previously you could easily see Total Folder Size before and after compacting - there would be an instant reduction displayed, so you know that compacting actually worked. Now, it's only possible to check compacting has worked by accessing the profile folders. I do not find this an improvement, maybe I should report as a bug.

Appended: Bug report: https://bugzilla.mozilla.org/show_bug.cgi?id=1881576

Modified by Toad-Hall

more options

Tested:

  • Set up the auto compact.
  • Deleted a load of emails from various folders
  • Emptied 'Deleted' folder

Noticed:

  • Size in Folder Pane reflects total size of just non deleted emails.
  • 'Deleted' folder size did not immediately change until I selected another folder and reselected 'Deleted'
  • 'Deleted' does not state any size not even zero 0

Check Size in Profile:

  • Folders which got emails deleted is not the same size as folders in Folder Pane.
  • Trash mbox file deleted - it does not exist after using 'Empty Deleted'
  • The 'Deleted' folder is selected to download full copies. So I expected it to have an mbox file with 0 size. Maybe I'm wrong on that but...

Pop up request to compact all folders.

  • Accept and it seems to work on folders, but cannot test if it's working on Trash because it does not exist.


The first query I asked in previous comment was 'what happened when you chose to manually compact one of the Trash folders? Did size in Profile get reduced to match the Properties size?

On other Trash folder which has an issue - assuming you do not mind losing all those emails in TRash.... Q: What happens to your 'Trash' if you right click and select 'Empty Deleted' ? Does it completely remove the 'Trash mbox file ?

more options

Hiya Todd-Hall - Thank you for responding ! :)


(before creating this post) I did try to manually compact the trash folder - it did NOT work

I NEVER use <empty deleted> I delete one by one in the trash folder - I let mails rest that should be *done-with* but there's a chance I'm not (it aides me when checking in- & sent folders for 'unresolved' mails) (and it is NOT an 'insane' amount of mails I have left at anytime)

The account I have with NO mails in the trash folder also have NO file named <Trash> in the profile folder(s)


So during the weekend I moved from Raspi Bullseye -> Raspi Bookworm & I'm now on Thunderbird 115.7.0 - one of the accounts with an 'enormous' trash-file is now MASSIVELY improved - the other is not ... I'm trying to wreck my mind as to if I have done anything differently between the two ... (I did set up Thunderbird with an import of the old profile folder - as far as I believe I've not 'treated' them differently in any way afterwards ...)


I've read your post 3 times now & I 'believe' I have responded to all you wanted to know ? :) - but if not; let me know and I'll return

more options

Manual or auto compacting can fail if:

  • The mbox file is too big. Basically there is not enough RAM to open the file. You may see an error message about there not being enough space on disk.
  • The mbox file is corrupted in some way. Maybe a badly formed email or maybe AV has messed it up at some point. Lack of maintenance. There are many reasons.
  • There is an interruption to the compacting process on the file being compacted. This may be caused by you using the file or exiting Thunderbird or Anti-Virus auto tries to opens and scans file which you are trying to compact etc.

For the account with the Trash having a large file size in profile, I would suggest you do the following because you may have file corruption and that's a risk you do not need. You cannot allow it to get too big because then you'll not be able to open it. The mbox file is just a simple text file. You need a fix.

  • Create a new folder called 'TempHold'
  • Select 'Trash'
  • Move all the emails which you want to keep for a while longer, into 'TempHold' folder.
  • Right click on 'Trash and select the 'Empty Deleted' option to kill that file
  • Check the profile to be certain that enormous file has been deleted.
  • When you next put emails into 'Trash' folder a new clean file will be created.

Modified by Toad-Hall

more options

ok so the thing about giving time for the compact-process I have had in mind; THUS I've asked to compact & let Thunderbird sit open uninterrupted for ... time (with no change)

The things you list don't give cause for me to think they're the reason that one account now is rid of the large trash-file

As to your 'fix' ... isn't the right word; workaround ? :) - couldn't I simply delete the trash file & then open Thunderbird & let is sync ? (it is imap I use) Also; I have NO idea which account to apply your fix to so I'd have to do it to all 5 accounts ?


And if 'something' is source for 'issues' then 'someone' should figure out the actual thing (in the sourcecode) that needs a fix ? :)))


On another note ? I have 5 account - each have content in Thunderbird folders as per bellow; /**** 1 = in 1 = sent 1 = trash /**** 1 = in 1 = sent 1 = trash /**** 1 = in 1 = sent 0 = trash /**** 1 = in 1 = sent 0 = trash /**** 0 = in 0= sent 0 = trash /****

BUT looking at the system folders it is; /**** 1 = in 0 = sent 1 = trash # /**** 1 = in 0 = sent 1 = trash /**** 1 = in 0 = sent 0 = trash /**** 1 = in 1 = sent 1 = trash /**** 1 = in 1= sent 0 = trash /****

the 'troublesome trash-file marked with an #

I'm NOT intelligent enough to match which goes with which to make 5 pairs ;O

Modified by Val

more options

So ... the 'conclusion' is up to me to 'decide' ? ^_^

more options

oh well ...

more options

re :- couldn't I simply delete the trash file & then open Thunderbird & let is sync ? (it is imap I use)

As you are using IMAP then you could access profile, exit Thunderbird and then delete the 'trash' and trash.msf'. It should auto created and resync because you are using IMAP.

re :I'm NOT intelligent enough to match which goes with which

Are you saying you are not sure which email address is used by which trash ? Or which account number = which email address ?

Here is some useful info:

In Thunderbird

  • 'Help' > 'Troubleshooting Information'
  • Near the top is a checkbox which says 'Include account names' - select the checkbox.

Normally, if you need to offer info from this section you would not select that checkbox because you do not want to post personal stuff. But for your own use select that checkbox.

  • Scroll down to the 'Mail and News Accounts' section.
  • It will tell you which 'account number' = which email address.
  • It will also tell you the 'Name' of the 'incoming server' which is also used as the name of the account folder. eg: imap.gmail.com

But if you have more than one account using same incoming server details then some accounts will have an additional number in the profile folder. How do you know which account relates to which account name folder in the profile.

In Thunderbird

  • Settings > General
  • Scroll to bottom and click on 'Config Editor' button

Using the account number info located in 'Mail and News Settings' Senario: if you had account4 for a particular email address using a server same as another and you need to know which number.

  • In top search type eg: account4

It should return two pieces of info: 1 : 'mail.account.account4.identities' and this will have an id number eg: id2

  • To locate email address for that account: Clear the search and now type: id2.user
  • You should now get: 'mail.identity.id2.useremail' and it will tell you the email address.

2: 'mail.account.account4.server' and this will have a server number eg: server3

  • To locate the name of account name folder: Clear the search and now type: server3.dir
  • It will return the eg: 'mail.server.server3.directory' and info tells you exactly the account name folder.
more options

I tried to move the file »Trash« without the file »Trash.msf« - now I have a new »Trash« file taking up 0 bytes of room even I do have a lot of mails in the trash folder inside Thunderbird (I figured out which account it is in a completely different way)


>Are you saying you are not sure which email address is used by which trash ? >Or which account number = which email address ?

It's somewhat the same is it not ? :)

What I meant; if you look at the 0s & 1s I wrote 0 = nothing 1 = something then I can't match Thunderbird folders to the system folders ...


>Here is some useful info: [...] folder.

ok I've 'looked' at it and I'll need a BIG piece of paper in order to see if anything match up But I'm not going to - as I would still have an eye to the above 0s & 1s ... so I foresee; - a LOT of time spent on trying to match it all - a LOT of time spend writing about it here - and not getting what I set out to accomplish; namely; someone that knows the code lines responsible for this 'hickup' to change said lines ...

I believe that the 'approach' I first tried out should have worked - I did set up the 5 accounts in the order they're shown in Thunderbird thus one would expect that reflected in the #-order in the system folder

And there's NO answer as to why 1 of the accounts 'suddenly' did bring its »Trash« file to a 'moderate' size...

So bottom line for me (as an Asperger) is; I should have learned the first time around I posted an issue @ the RaspPi pages that I shouldn't do such AT ALL !

I do however appreciate that you've spend time trying to help ! :)

*and now I'm out of here* ;O

Modified by Val