There is lots to be said about the intricacies of IMAP delete flags vs. actual expunging of deleted messages and the confusion caused when something is merely flagged for deletion and the user expected it to be really gone. This post is not about that. Everyone agrees that once a message is expunged, it definitely should be gone. But sometimes expunged messages still display in Thunderbird!
I often observe this:
- Delete message on the way to work using K-9 on my phone.
- Arrive at work and message is gone from my Inbox in Mail.app
- Come home, download new mail in Thunderbird and see an Inbox full of undead messages.
No amount of re-expunging and re-fetching mail helps. Grepping through the server-side Maildir shows the messages really are gone from the folders in which Thunderbird is still showing them.
It turns out the reason they are still displaying in Thunderbird is mundane client-side index corruption. To clean things up:
- Right-click on mailbox
- Choose Properties...
- Click Repair Folder
- Rejoice at tidy mailbox