Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

jasnw

macrumors 65816
Original poster
I'm working on a script (tcsh) to copy *.emlx files out of Mail's directory structure in ~/Library for processing. Everything is working fine EXCEPT for the fact that when I delete all email in the mailbox the files are in (deleting is done in the Mail app) they show that they're gone in Mail but the verdamte files are still there when my script takes another look. This is after I've also emptied all Trash and Spam and quit and restarted Mail. Aside from the annoyance factor, does this mean that my disk is full of mail that I thought was deleted? I'm not trying to delete email via the shell script, I know better than that. This is the Mail app saying files are deleted when they are not.

Any ideas on this?

I'm running on Sequoia, latest update.

LATER : Started flailing around trying everything, and finally rebuilding that mailbox made the deleted files go away. That particular mailbox had been around for maybe two hours and had had five emails in it at max. What the frak would cause Mail to lose track of what's up with this one mailbox so badly?
 
Last edited:
It might keep the mails around in case you want to undo the delete, perhaps 30 days as in other cases, but this is just a guess.
 
The "management" of Mail's files is very poor – I presume you are talking about ~Library/Mail/V10/. It basically becomes a cache that is often never cleaned up. For anyone using IMAP rather than POP – which is pretty much everyone these days, and in any case, Mail knows this – there is no reason for it not be cleared, say, once a week.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.