7

I am using Thunderbird + IMAP. Thunderbird caches messages locally in:

.icedove/asdfgh.default/ImapMail/mail.example.com/

For each IMAP folder, there are files Folder and Folder.msf.

I have noticed, when I delete an email with large attachment, and then delete it from Trash also, than the trash file .icedove/asdfgh.default/ImapMail/mail.example.com/Trash still contains the email (and the attachment). Thus, even though from within Thunderbird it looks as if the message has been deleted (or expunged from trash, or what ever the term is), the message data is still in the trash file (I can see it when I open the Trash file with my text editor)

Can anybody please explain what is happening here? How can I really delete an email?

And I should add that the email has been successfully deleted on the IMAP server. So, Thunderbird has deleted the email on the server, but for some reason still keeps the data in the file.

Martin Vegter
  • 69
  • 66
  • 195
  • 326

2 Answers2

5

Its similar to how the data in a rm'd file will still be there until the disk space is reused. Thunderbird marks it free, but doesn't actually free it (which could involve moving later messages in the file, etc.).

The way to make it actually free it is to compact the folder. Right-click the trash and select 'Compact'. That should do it. You can also select 'Compact Folders' under the File menu to do all folders.

derobert
  • 107,579
  • 20
  • 231
  • 279
  • 1
    thanks, that worked. I have also found where you can set it to be done automatically: `Options -> Advanced -> Network & Disk Space -> "Compact folders when it will save over X MB"` – Martin Vegter Jul 21 '14 at 06:00
0

I have just tried it on my system with Gmail, and found I have the same problem. A not so practical way to have it clean is to right-click the folder, select Properties, and then click on Repair folder.

One thing I found interesting is that .icedove/asdfgh.default/ImapMail/mail.example.com/Trash was deleted and didn't appear anymore, even after opening a few emails, attachments, and restarting Thunderbird.

admirabilis
  • 4,642
  • 9
  • 41
  • 57