For reasons still unknown my Apple Mail (macOS 13.2) got stuck in an endless "Moving messages" loop. The Internet offers many different solutions to this problem but unfortunately many did not work for me. Until I discoved this page that contained a procedure that did make the "Moving messages" go away.
For future reference, these are the steps:
- Exit Apple Mail
- Open Finder and go to this folder:
~/Library/Mail/V10/MailData/
(note that I could not access this folder from the terminal) - Remove all files that start with
Envelope Index
- Next, go to the folder
~/Library/Saved Application State/
and remove the folder that starts withcom.apple.mail
- Restart Apple Mail, it will then start rebuilding your mailbox in the background which can take quite some time
Happy e-mailing!