Starting tonight (Tue Jan 7, 2025) my Thunderbird has started popping-up sporadic compaction failure error boxes, usually (but not solely) in regards to Trash folders. These messages look like this:
The folder ‘[Gmail]/Trash on my.email@gmail.com’ could not be compacted because writing to the folder failed. Verify that you have enough disk space, and that you have write privileges to the file system, then try again.
(Keep in-mind that what Thunderbird calls a “folder” isn’t a directory but rather a regular file, or often a pair of files. For example, a “folder” called “Fred” would typically be a pair of regular files named “Fred” and “Fred.msf”.)
I went into the afflicted directory (“~/.thunderbird/ProfileName/ImapMail/my.email@gmail.com/[Gmail].sbd”) and tried altering the two files “Trash” and “Trash.msf” with micro. I successfully altered and saved both files. So I can write to them, but Thunderbird can’t, at least not when compacting. (It can add things to trash, or empty trash, but not compact it.)
The same problem also exists on a few other folders, mostly “Trash” but some others as well. I’d say about 5% of “folders” in Thunderbird cannot be compacted and give bogus “privileges” errors like the one I quote above.
I even tried going into ~ as my main user and doing “chmod -R 777 .thunderbird” (giving full permissions to all users for everything in that tree), but it made no difference; the problem persists.
So I’m perplexed. Anyone else being having Thunderbird folder compaction issues lately? And what might be causing this?
I’m not sure about what can be done with the non-Trash folders you are having the same problem with, especially if you do not want to delete emails. The second thread I linked to does suggest:
If that resolves the issue for the Trash Folder, you can one by one, delete the file.msf files for the other folders.
Do you really have enough space? What is the length of the Trash file and how much free space do you have on your disk? Sometimes free space in filesystems like btrfs can be misleading.
Ok, let me try that… verified that trash has something in it… emptied trash… ordered TB to compact… error persists… exit TB… went into “~/.thunderbird/SR_Linux_aragorn_TB/ImapMail/my.email@gmail.com/[Gmail].sbd”… deleted both “Trash” and “Trash.msf”… restart TB… deleted 1 email… verify that deleted email is in trash… emptied trash… compacting folder… Ah-ha, error message is gone!
Ok, then that works. Interesting that doing a “repair” on the folder did not work, but manually deleting both “Trash” and “Trash.msf” did work. Weird. ¯_(ツ)_/¯ Anyway, thanks for the tip!
Not at all. The btrfs issue “I’m out of space although free command says there’s a lot more room” is something repetitive in the forum so better discard first the easyest.