mail messages are not purged from the mail file after delete and empty trash



MailNews Core
15 years ago
10 years ago


(Reporter: John FT McGlaughlin, Assigned: Bienvenu)


Firefox Tracking Flags

(Not tracked)




15 years ago
User-Agent:       Mozilla/5.0 (compatible; MSIE 5.0; Windows 98;)
Build Identifier: 	
Mozilla/5.0 Mozilla Debian Package 1.4-4 /  Mozilla 2000 

Deleted 6 months of messages from a filtered folder
emptied years worth of trash
tar default for archive.
dropped jaw when seeing that forsale directory with 112 messages requires 400M 

-rwxr--r--    1 jmcglaug jmcglaug 396993154 Sep 24 13:08 forsale*
-rw-r--r--    1 jmcglaug jmcglaug    58768 Sep 24 13:08 forsale.msf

So lets do an example:
see steps sorry

Reproducible: Always

Steps to Reproduce:

test Comm 
2224 unread messages of 2477 total

-rwxr--r--    1 jmcglaug jmcglaug 14254654 Sep 24 13:08 test Comm*
-rw-r--r--    1 jmcglaug jmcglaug   965029 Sep 24 13:36 test Comm.msf

Delete msssages from 10/19/01 -> 12/32/02
Unread 1451 Total 1611

-rwxr--r--    1 jmcglaug jmcglaug 14254654 Sep 24 13:42 Inbox.sbd/test Comm*
-rw-r--r--    1 jmcglaug jmcglaug  1021772 Sep 24 13:42 Inbox.sbd/test Comm.msf

-rw-------    1 jmcglaug jmcglaug  3590044 Sep 24 13:42 Trash
-rw-r--r--    1 jmcglaug jmcglaug   330424 Sep 24 13:42 Trash.msf

Empty the trash

-rwxr--r--    1 jmcglaug jmcglaug 14254654 Sep 24 13:42 Inbox.sbd/test Comm*
-rw-r--r--    1 jmcglaug jmcglaug  1021772 Sep 24 13:42 Inbox.sbd/test Comm.msf

-rw-------    1 jmcglaug jmcglaug        0 Sep 24 13:45 Trash
-rw-r--r--    1 jmcglaug jmcglaug     1250 Sep 24 13:45 Trash.msf

Actual Results:  
housekeeping Trash.msf and Trash file are correct
houskeeping never updates the deletefolder or deletefolder.msf

Expected Results:  
deletefolder should have reduced its size since messages were deleted

This is becoming catastrophic as quotas are being adversly affected.

The only undesireable workaround I can perform is to create a dummy folder
move messages to that folder
delete original folder and empty trash.
move new folder to proper placement and rename it
correct the filters

Comment 1

15 years ago
did you try compacting the folders in question? Select the folder and using the
context menu, compact this folder? Or File | Compact Folders will compact all
the folders for your account.

Comment 2

15 years ago

A side case of this bug is that once deleted messages are moved to trash,
and the user decides to "undo" the delete.
The messages remain in the Trash file. even thought the Trash folder reports no

In this case Empty Trash does not remove the data from Trash nor Trash.msf
Re-deleting the files does allow Trash to be emptied.

Also found that "compact" does expunge the messages.  I shuold think this should
be the secondary behavior of Trash as there is no mechanism for recovery.

If this is indeed the intended behavior:
When I delete a message: Choose the behavior you want for deleted messages.
"Move it to the Trash folder" is recommended unless you are instructed to use a
different setting by your system administrator or service provider. Messages
marked as deleted are removed only when you compact folders.

I suppose this bug could be junked,  BUT this does not preclude the extra step
required as well as the ambiguous command compact; which, for years I assumed
was to conserve disk space and thus would be a performance hit to have folders
resummaried on each access such as the case of linux access to a fat partition

Comment 3

15 years ago
this is by design; see duped-to bug and its other duplicates FMI.

*** This bug has been marked as a duplicate of 183837 ***
Last Resolved: 15 years ago
Resolution: --- → DUPLICATE

Comment 4

15 years ago
Well, that is exactly the reason why there's a separate compact-command : to
avoid the performance hit when you're deleting mail from the middle of a folder
(which is 1 large file in  mbox-format). Compacting can be a slow process,
especially over the network. That's why we avoid it as much as possible.

Look into your Preferences -> mail & Newsgroup -> Offline & Diskspace : there
you'll find a option to automatically compact your folder when it would save xxx
KB. That would have helped you in this case. Ofcourse, compacting a 400 MB file
to save a few hundred of kilbytes, will be not much of an improvement. You'll
need almost 400MB for the temporary file alone.

Note that when a mail is deleted, but the folder hasn't been compacted yet, then
*new* mail will be written on top of the old mail. This is not a waste of
diskspace, it's a big performance improvement. Just look at your Trash Folder :
you'll move a few files to the trash, hit delete. A few minutes later, you move
again a number of files to the trash. Your trash-file won't grow, becuase the
newly trashed files will be written on top of the old ones (if possible, becuase
a mail can't be split).
Product: MailNews → Core
Product: Core → MailNews Core
You need to log in before you can comment on or make changes to this bug.