"Compacting" folder.

The place to post if you need help or advice

Moderators: ChrisThornett, LXF moderators

"Compacting" folder.

Postby catgate » Fri Jun 29, 2012 9:23 pm

I have recently started getting a pop up in Thunderbird asking me if I would like folders compacting. I thought it a bit odd and wondered if it was a new "feature". So I looked up "compacting" on the Mozilla site :-

"Compact Inbox or Other Folder

Thunderbird folders (including the Inbox, Drafts, etc) are stored in files on the local hard drive. As messages are added to folders, the files grow larger. However, when you delete a message or move it from one folder to another, the file containing the folder does not automatically get smaller. To reduce the file size, folders can be compacted."

Does this really mean that despite the fact I have "deleted" messages they are still there occupying space, and lurking "incognito"?
Oh, sod it.
catgate
LXF regular
 
Posts: 1048
Joined: Wed Jul 19, 2006 6:45 pm
Location: Just over there, in that corner.

Postby MartyBartfast » Fri Jun 29, 2012 9:36 pm

Yes and if you find the file containing that folders messages you can view that file and see the deleted mail contents.
Once you compact the folder it removes deleted messages from the files.
I have been touched by his noodly appendage.
User avatar
MartyBartfast
LXF regular
 
Posts: 815
Joined: Mon Aug 22, 2005 7:25 am
Location: Hants, UK

Postby Rhakios » Fri Jun 29, 2012 11:15 pm

Indeed, my father never compacts email folders, so when I have upgraded his computer and imported his old emails, he gets back all the ones he thought he'd deleted as well. :roll:
Bye, Rhakios
User avatar
Rhakios
Moderator
 
Posts: 7634
Joined: Wed Apr 06, 2005 11:18 pm
Location: Midlands, UK

Postby Debian Acolyte » Sat Jun 30, 2012 12:14 am

I must wonder at the logic behind such a setup. I cannot see an advantage in retaining "deleted" files. After all, delete means "delete", not hide. Perhaps it is the developers' misguided way of preventing accidental deletion?
Debian Stable
Openbox
User avatar
Debian Acolyte
 
Posts: 25
Joined: Wed Jun 27, 2012 7:21 am
Location: China

Postby Rhakios » Sat Jun 30, 2012 6:13 am

If it's an mbox, then strictly speaking it isn't retaining a file, mboxes can be opened as one long text file in an editor.
OTOH, we all know, do we not, that when we delete files from a file system, the file itself is not deleted, only its reference in the file allocation table (or similar).
Bye, Rhakios
User avatar
Rhakios
Moderator
 
Posts: 7634
Joined: Wed Apr 06, 2005 11:18 pm
Location: Midlands, UK

Postby MartyBartfast » Sat Jun 30, 2012 7:18 am

Debian Acolyte wrote:I must wonder at the logic behind such a setup. I cannot see an advantage in retaining "deleted" files. After all, delete means "delete", not hide. Perhaps it is the developers' misguided way of preventing accidental deletion?


It's even more bizzare than that, when you 'delete' a mail in Thunderbird you then end up with TWO copies of the text! As it moves the mail to the Trash folder, and marks the mail as being deleted from the original folder but as discussed above the original text is still in the folder mbox.

I've a feeling that when you empty the trash folder it automatically compacts that folder but can't be 100%.

This has been a bit of a pain in the past when I've been sent a dodgy Email that I delete immediately, but then my regular virus scan detects the infection on the associated folder and will continue to do so until it gets compacted.
I have been touched by his noodly appendage.
User avatar
MartyBartfast
LXF regular
 
Posts: 815
Joined: Mon Aug 22, 2005 7:25 am
Location: Hants, UK

Postby Debian Acolyte » Sat Jun 30, 2012 8:00 am

I do not use applications like Thunderbird, so I must ask; Can the mail be deleted with Shift+Del like with a file manager, or must they be deleted with the two-step process of delete followed by compact?
Debian Stable
Openbox
User avatar
Debian Acolyte
 
Posts: 25
Joined: Wed Jun 27, 2012 7:21 am
Location: China

Postby MartyBartfast » Sat Jun 30, 2012 9:18 am

Debian Acolyte wrote:I do not use applications like Thunderbird, so I must ask; Can the mail be deleted with Shift+Del like with a file manager, or must they be deleted with the two-step process of delete followed by compact?


A quick experiment shows that shift+del will not send the message to the trash folder, but it still leaves the message text in the original folder until such time as it is compacted.

There's also an option under Preferences /Network & Disk space for
"Compact folders when it will save over ?? MB", so by choosing a suitably low value for ?? (min=1) it should compact the folders automatically on a more frequent basis.
I have been touched by his noodly appendage.
User avatar
MartyBartfast
LXF regular
 
Posts: 815
Joined: Mon Aug 22, 2005 7:25 am
Location: Hants, UK

Postby Debian Acolyte » Sat Jun 30, 2012 9:53 am

Thanks for the information. Myself, I believe "compact folder" is a poor term to use. Perhaps something like "Empty deleted messages" would be better? Oh well. Since I do not use it, it does not affect me. :D

By the way. Your signature frightens me a little. :lol:
Debian Stable
Openbox
User avatar
Debian Acolyte
 
Posts: 25
Joined: Wed Jun 27, 2012 7:21 am
Location: China

Postby Rhakios » Sat Jun 30, 2012 11:44 am

By the way, it's not only Thunderbird that behaves this way, I was actually migrating my father's e-mail from KMail to Thunderbird, but I was aware from my own experience of Thunderbird that things are no different there.
Bye, Rhakios
User avatar
Rhakios
Moderator
 
Posts: 7634
Joined: Wed Apr 06, 2005 11:18 pm
Location: Midlands, UK

Postby catgate » Sat Jun 30, 2012 11:56 am

Rhakios wrote:OTOH, we all know, do we not, that when we delete files from a file system, the file itself is not deleted, only its reference in the file allocation table (or similar).

When I used to use M$ stuff I always thought, and never saw any reason to doubt the idea, that, when its reference was removed from the FAT, the space occupied by the file, whose "pointer" had been removed, was free to be reallocated for over writing.
The suggestion of compacting in Thunderbird seems to indicate that that space will now simply be zipped.
Oh, sod it.
catgate
LXF regular
 
Posts: 1048
Joined: Wed Jul 19, 2006 6:45 pm
Location: Just over there, in that corner.

Postby nelz » Sat Jun 30, 2012 6:54 pm

It's about efficiency. If the whole file had to be rearranged every time you tried to remove a few kB from the middle of it, you'd soon be complaining about how slow your mailer had become.

The real answer is to not use mbox files at all. Maildir stores each mail as a separate file, so deletion is quick and easy, and the space it used becomes available immediately. Minimising the loss caused by one file being corrupted is also a very good reason to avoid mbox.
"Insanity: doing the same thing over and over again and expecting different results." (Albert Einstein)
User avatar
nelz
Site admin
 
Posts: 8497
Joined: Mon Apr 04, 2005 11:52 am
Location: Warrington, UK

Postby Rhakios » Sat Jun 30, 2012 7:28 pm

I'm inclined to wonder about that nelz, one of the problems with moving from KMail to Thunderbird is that the latter can't import KMail's folders, which default to maildir. So, one needs to export the emails to mbox format before importing them into Thunderbird. Umpteen such stories are to be found by searching for "migrate kmail to thunderbird". And that was how I did it.
If emails are deleted properly using maildir then I wouldn't have expected to see old emails turning up when importing the mbox into Thunderbird.
Bye, Rhakios
User avatar
Rhakios
Moderator
 
Posts: 7634
Joined: Wed Apr 06, 2005 11:18 pm
Location: Midlands, UK

Postby nelz » Sat Jun 30, 2012 9:27 pm

There is the facility with maildir to mark mails for deletion but delete them later. It is useful with IMAP sessions as all the mails can be marked then deleted at the end of the session, but there's no point in using it with a local mail store. Not that having a point has much bearing on decisions regarding KDE's PIM suite :(
"Insanity: doing the same thing over and over again and expecting different results." (Albert Einstein)
User avatar
nelz
Site admin
 
Posts: 8497
Joined: Mon Apr 04, 2005 11:52 am
Location: Warrington, UK


Return to Help!

Who is online

Users browsing this forum: Google [Bot] and 1 guest