How to recover messages deleted via sync&storage settings

User Help for Mozilla Thunderbird
momotalo
Posts: 6
Joined: July 24th, 2004, 11:43 am

How to recover messages deleted via sync&storage settings

Post by momotalo »

I have thunderbird on multiple computers to manage my work email (exchange server via IMAP), each computer has local copies of all my emails in the past.

Sometime last year, I received a message saying my work email account is close to the quota. So, on one of my work computers, I went to the menu Edit\Account Settings\<account name>\Synchronization&Storage, and set the field "Delete messages more than __ days old", and the clicked OK. After that, the emails older than the days I set disappeared. Those emails also disappeared from the email server. I thought that was not a big deal because all my other computers still have all the old emails locally, and as long as I don't make the same setting, I will still be able to access those old email copies locally.

However, it turned out I was wrong, on every other computer, as long as I open thunderbird and click on my Inbox, I found the older emails are all gone! despite my sync&storage setting does not set any time limit.

However, when I check my local folders (Linux:~/.thunderbird/xxxx.default/ImapMail/<account>/, I still see a large INBOX file (>5GB), as if nothing was deleted. However, no matter what I do, I could no longer see or search those old emails from thunderbird.

my question is, how can I get those old emails back? I've already restored the sync&storage setting to no-time limit on the only computer I changed previously, but the old emails remains invisible. Just judging from the INBOX file size, I am hoping those were not permanently deleted.

Please let me know you have any suggestions what I can do to bring those emails back. thanks a lot!
User avatar
DanRaisch
Moderator
Posts: 127231
Joined: September 23rd, 2004, 8:57 pm
Location: Somewhere on the right coast

Re: How to recover messages deleted via sync&storage setting

Post by DanRaisch »

It's possible those messages will not be recoverable but you can try the following:

* - Turn off Thunderbird and do not compact
* - Locate the file containing the message (Inbox, with no extension) in your profile and make a copy of that file (perhaps call it InboxOld.
* - Delete the file with the same name but with the extension .msf
* - Open the file without extension with a text editor)
* - Locate the messages that were unintentionally deleted
* - Change the status (X-Mozilla-Status) to all zeros
* - Save that file to the directory of Thunderbird's Local Folders ( http://kb.mozillazine.org/Local_Folders ) with the name IMAPIbox
* - Launch Thunderbird and look in the Local Folders for a sub-folder named IMAPInbox which may contain the deleted messages
momotalo
Posts: 6
Joined: July 24th, 2004, 11:43 am

Re: How to recover messages deleted via sync&storage setting

Post by momotalo »

@DanRaisch, I followed your suggestions, and I was able to see all my old emails in the new folder. thank you so much!

[EDIT] actually, after careful checking, I realized that about 1.5 year worth of emails were still not recovered. any suggestions what else I can do? [/EDIT]

on the other hand, I still have one computer that has a copy of thunderbird which contains most of the older emails, I never wanted to start this copy because I was afraid of losing all old emails as the folder starts to sync. Is there a way I can access those copies without worrying that it will disappear again?
User avatar
DanRaisch
Moderator
Posts: 127231
Joined: September 23rd, 2004, 8:57 pm
Location: Somewhere on the right coast

Re: How to recover messages deleted via sync&storage setting

Post by DanRaisch »

Disconnect that computer from the network/Internet before launching Thunderbird. That will prevent it from accessing the server and acting on the deletion. Copy the messages from the IMAP folder to a sub-folder of Local Folders. That will ensure that they are not synched to the server even if Thunderbird is later connected to the Internet.
mozurkewich
Posts: 280
Joined: April 7th, 2008, 9:58 am

Re: How to recover messages deleted via sync&storage setting

Post by mozurkewich »

I am looking for an answer to something related to this. I want to delete messages from the server, but keep them on my computer. Can I do that my first copying the messages to a local folder, then deleting them from the server?

It seems that when I delete on the server, the messages disappear from my computer (unless, I think, I first move or copy them to a local folder). Does that seem right?

When I delete on my computer, the messages do not get deleted from the server. Is that right? Is the only way to delete from both, do to it on the server?
User avatar
DanRaisch
Moderator
Posts: 127231
Joined: September 23rd, 2004, 8:57 pm
Location: Somewhere on the right coast

Re: How to recover messages deleted via sync&storage setting

Post by DanRaisch »

It sounds as though you have an IMAP type account. With that email protocol, the messages you see in an account folder in Thunderbird are stored on the server and deleting them in Thunderbird deletes them on the server as well as in TB. Moving (or copying) those messages to a sub-folder of Local Folders breaks the link between the message and the server so you can delete a message on the server side without touching the message in TB, or delete the message in that local folder without impacting whats on the server.
mozurkewich
Posts: 280
Joined: April 7th, 2008, 9:58 am

Re: How to recover messages deleted via sync&storage setting

Post by mozurkewich »

OK, thanks. So if I want to keep messages to a local folder and delete them on the server, I should copy them to the local folder and then delete them in TB?
User avatar
DanRaisch
Moderator
Posts: 127231
Joined: September 23rd, 2004, 8:57 pm
Location: Somewhere on the right coast

Re: How to recover messages deleted via sync&storage setting

Post by DanRaisch »

and then delete them in TB?
Change that last to "and then delete them from the IMAP account folder in TB" and you'll have it.
mozurkewich
Posts: 280
Joined: April 7th, 2008, 9:58 am

Re: How to recover messages deleted via sync&storage setting

Post by mozurkewich »

DanRaisch wrote:
and then delete them in TB?
Change that last to "and then delete them from the IMAP account folder in TB" and you'll have it.
That is what I meant, but it is good that you clarified.

One more thing: should I be able to find the local folders on my hard drive? If so, where? I think I would need to know that if I ever want to find them on my backup drive. Plus, I'd feel better being able to see that they are there.

Mac running El Capitan 10.11.6, Tbird 52.5.2, backups using Time Machine.
User avatar
DanRaisch
Moderator
Posts: 127231
Joined: September 23rd, 2004, 8:57 pm
Location: Somewhere on the right coast

Re: How to recover messages deleted via sync&storage setting

Post by DanRaisch »

OK, for that information I'll have to refer to one of our Mac users. You should hear from them shortly.
User avatar
RobertJ
Moderator
Posts: 10880
Joined: October 15th, 2003, 7:40 pm
Location: Chicago IL/Oconomowoc WI

Re: How to recover messages deleted via sync&storage setting

Post by RobertJ »

.
The Thunderbird profile(s) are here

/Users/<user_acct>/Library/Thunderbird/Profiles/

.
FF 92.0 - TB 78.13 - Mac OSX 10.13.6
User avatar
DanRaisch
Moderator
Posts: 127231
Joined: September 23rd, 2004, 8:57 pm
Location: Somewhere on the right coast

Re: How to recover messages deleted via sync&storage setting

Post by DanRaisch »

Thanks, Robert.

Within the profile, the Local Folders element can be found under ...\Profiles\RANDOMXXXX.default\Mail, where RANDOMXXXX is a random string of characters assigned during the installation of Thunderbird.
mozurkewich
Posts: 280
Joined: April 7th, 2008, 9:58 am

Re: How to recover messages deleted via sync&storage setting

Post by mozurkewich »

RobertJ wrote:.
The Thunderbird profile(s) are here

/Users/<user_acct>/Library/Thunderbird/Profiles/

.
Thanks. From file size and date I deduce that the files is global-messages-db.sqlite.

How do I recover an old message from my backup disc? Do I need to make a copy of global-messages-db.sqlite, then restore that files from the backup? Then copy the message to the server and replace the old global-messages-db.sqlite file with the new one?
User avatar
DanRaisch
Moderator
Posts: 127231
Joined: September 23rd, 2004, 8:57 pm
Location: Somewhere on the right coast

Re: How to recover messages deleted via sync&storage setting

Post by DanRaisch »

No, that's not the right file. It is an index file and contains only a portion of the data of each message. The files you want have the same name as folders displayed in Thunderbird, e.g. Inbox, Drafts, Sent, Trash, etc. They will have no file name extension.
User avatar
RobertJ
Moderator
Posts: 10880
Joined: October 15th, 2003, 7:40 pm
Location: Chicago IL/Oconomowoc WI

Re: How to recover messages deleted via sync&storage setting

Post by RobertJ »

.
They will bi in a directory in the profile called "Mail" and list a folder for each account like

Local Folders
pop.gmail.com
pop.gmail-1.com
pop.gmail-2.com
pop.gmail-3.com


and in each of those folders you will see the following types of files

Drafts
Drafts.msf
Inbox
Inbox.msf
msgFilterRules.dat
popstate.dat
Sent
Sent.msf
Trash
Trash.msf

which contain what you are looking for.

.
FF 92.0 - TB 78.13 - Mac OSX 10.13.6
Post Reply