Deleted messages stuck in mailbox, deleting fails

Recently, I’ve started to see some problems with SpamSieve and Apple Mail, specifically that messages that are classified as Spam, or I train as spam get “stuck” in the inbox. In some cases, “stuck” means that if I switch away from that mailbox then back, it has gone meaning it was primarily I think a failure to update the display after it was deleted. The worse case is where it gets truly stuck and switching away doesn’t help. In this case, selecting the main in the mailbox the message shows as “This message was not found in the specified location because it was moved or deleted. Please resync your client.”.

If I try to manually delete it, it errors with “This message was not found in the specified location because it was moved or deleted. Please resync your client.” That message can pile up overnight and given it’s a modal dialog, at that point Mail is essentially dead. Telling Mail to synchronize the account happens, but the message is still stuck. The only way I’ve found to fix it, is to delete the account and reconnect it to fully flush Apple Mail’s index for it.

I’m running one account via Microsoft 365 Exchange, and the other with AWS WorkMail (exchange compatible) and the issue seems to impact both. I’m running Tahoe 26.5 currently and a M2 Max Mac Studio.

I suspect that this may be much more a Mail problem than SpamSieve but figured that I would flag it.

SpamSieve is not involved in the message movement, syncing, or display. It sounds like there’s a bug here with Mail’s Exchange support. It’s also possible that Mail’s database is damaged and needs to be rebuilt.

1 Like

Thanks Michael for the stunningly quick reply - that’s what I suspected. Appreciate the link on database rebuilds.

Regularly rebuilding your account is a good idea for cloud-managed accounts!
There are sometimes refresh bugs between devices!