'On My Mac' email folder structure disappeared
I have (or rather had) a folder structure set up where I moved incoming emails to once I had dealt with them. I have a number of different email addresses (work as well as private, iCloud and others). Last night for some obscure reason, I was suddenly logged out of my appleID and there had to login to again and once this was done, the entire structure had disappeared. In addition all email accounts with exception of my iCloud account were missing (I have successfully recovered these).
The big problem is: Under 'On my Mac' in the right hand column of the Mail App, I just see the folders: 'Bin' and 'Import'. And in the 'Import' folder I can see all the emails that were previously inside the structured folders, but just as a long list (there are 26000 emails). Can anyone shed light on what has happened and preferably how I reverse this problem? OS is Ventura 13.1. I have Time Machine backups for the machine (MacBook Air 2022 (M2)) until a day ago.
MacBook Air, macOS 13.1