Locked mailbox in Mail.app


Official Bartender
I've just downloaded some mail (via a rule) into a mailbox, which is (a) empty, despite the fact I know it has stuff in it, (b) will not set to 'READ' once I've opened it, and (c) crashes mail every time I try to delete it.

i looked in the mailbox, and the content of the mail is definitely in there. However, there is an invisible '.lock' file in the package which the others don't have. I can't work out how to delete it, and I can't move any of the mails out of this corrupted mailbox into a different on.

Ideas? anyone seen this before?

OK, messed about with the files a bit, and managed to get rid of the .lock file from the mailbox. But it didn't help - Mail still quits if I attempt to delete the offending item, which is still appearing as blank. I was thinking it might be that the table_of_contents file was corrupt, as there's another mail which appeared empty in the Mail GUI, but you could see it wasn't if you look in the mbox file. Also, the messages didn't always match their headers.

Then I suddenly remembered - there's a 'REBUILD MAILBOX' option in the Mailboxes menu. One click, and the whole damn thing was fixed! I feel well stoopid now.