I have an IMAP mail server and use Thunderbird as my client. I didn't understand the sychronization of client-server using IMAP vs POP. My IMAP server was filling up, so I logged onto the server and deleted the Inbox thinking that Thunderbird had local copies of the mail.
When I opened Thunderbird, it synched against the IMAP server and marked all my email as deleted. The emails still exist in the {path}/thunderbird/profile/default/INBOX file fortunately. After some research on the net, I edited that file and changed all the “X-Mozilla-Status:0001" to "“X-Mozilla-Status:0000".
When I brought Thunderbird back up, the emails were still gone. Does anyone know how to recover these?
I had a similar problem - through some quirk a bunch of emails disappeared from my IMAP server, but remained in the INBOX and Sent files on the local drive. I was unable to coerce Thunderbird to restore those emails onto the IMAP server directly, so I went with another approach:
Done!
IMAP and POP are not the same! POP is a transfer protocol, pulling e-mail from the server to the client. IMAP is a synchronization protocol, keeping e-mail on the server, and usually keeping a local cache version.
IMAP has a two stage delete, though most clients don't separate them. They are: Mark as Deleted, and Purge Deleted. Like I mentioned, most clients do both at the same time.
Once an e-mail is purged from the server it should be flushed from any local caches, permanently deleting the e-mails, upon next synchronization. Changing a cache will not change the server.
Accidents are the reason you take good backups; so you can just restore the e-mails.
Here's a solution that doesn't require you to create a new pop-account.
It's good if you don't have a lot of mails or whole folders got emptied.
We noticed that some mails appeared twice in the new local folders, but just one of them was marked unread. So you can easily filter them.
do you mean that you ssh'ed into the server? what kind of server is it? if it's running a snapshotting filesystem, it may be possible to recover the inbox from the snapshots...