I accidentally lost all my e-mails except for those in the inbox
folder while changing the server configuration. I can still see the entire history of the mail server in the mbox
file but I can't seem to figure out how can I retrieve all those email into the IMAP server.
I've read up on mbox
specification and there doesn't seem to be any mechanism that would indicate that the e-mail has been moved by the IMAP server to a folder. I deleted the ~/mail
directory, renamed the mbox
file, restarted each time but the Dovecot still somehow knows which messages inside the mbox
file have been moved and which haven't. I still can see the trash folder and it still has the messages that have been moved there.
How can I make the Dovecot forget all the data it has stored about this mbox
file and reload it whole unsorted into the inbox
folder, as if it was a new installation of the server?