MozillaZine

How to recover messages deleted via sync&storage settings

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

Post Posted January 9th, 2018, 4:35 pm

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!

DanRaisch
Moderator

User avatar
 
Posts: 119904
Joined: September 23rd, 2004, 8:57 pm
Location: Somewhere on the right coast

Post Posted January 9th, 2018, 7:16 pm

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: 4
Joined: July 24th, 2004, 11:43 am

Post Posted January 10th, 2018, 1:14 pm

@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?

DanRaisch
Moderator

User avatar
 
Posts: 119904
Joined: September 23rd, 2004, 8:57 pm
Location: Somewhere on the right coast

Post Posted January 10th, 2018, 5:48 pm

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: 107
Joined: April 7th, 2008, 9:58 am

Post Posted January 11th, 2018, 7:08 pm

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?

DanRaisch
Moderator

User avatar
 
Posts: 119904
Joined: September 23rd, 2004, 8:57 pm
Location: Somewhere on the right coast

Post Posted January 11th, 2018, 8:06 pm

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: 107
Joined: April 7th, 2008, 9:58 am

Post Posted January 11th, 2018, 8:24 pm

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?

DanRaisch
Moderator

User avatar
 
Posts: 119904
Joined: September 23rd, 2004, 8:57 pm
Location: Somewhere on the right coast

Post Posted January 11th, 2018, 8:41 pm

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: 107
Joined: April 7th, 2008, 9:58 am

Post Posted January 12th, 2018, 10:18 am

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.

DanRaisch
Moderator

User avatar
 
Posts: 119904
Joined: September 23rd, 2004, 8:57 pm
Location: Somewhere on the right coast

Post Posted January 12th, 2018, 12:45 pm

OK, for that information I'll have to refer to one of our Mac users. You should hear from them shortly.

RobertJ
Moderator

User avatar
 
Posts: 10597
Joined: October 15th, 2003, 7:40 pm
Location: Chicago IL/Oconomowoc WI

Post Posted January 12th, 2018, 12:57 pm

.
The Thunderbird profile(s) are here

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

.
FF 61.0.2 - FF 62b17 - FF 63a - TB 52.9.1 - Mac OSX 10.13.6
Computers I've used: IBM 7094/UNIVAC 1108/IBM 360/DEC PDP11/DEC VAX-11 780/DEC VAXstation 8000/Sun SPARCstation 2/Mac from 1984 to 2018

DanRaisch
Moderator

User avatar
 
Posts: 119904
Joined: September 23rd, 2004, 8:57 pm
Location: Somewhere on the right coast

Post Posted January 12th, 2018, 1:06 pm

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: 107
Joined: April 7th, 2008, 9:58 am

Post Posted January 13th, 2018, 9:28 am

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?

DanRaisch
Moderator

User avatar
 
Posts: 119904
Joined: September 23rd, 2004, 8:57 pm
Location: Somewhere on the right coast

Post Posted January 13th, 2018, 2:39 pm

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.

RobertJ
Moderator

User avatar
 
Posts: 10597
Joined: October 15th, 2003, 7:40 pm
Location: Chicago IL/Oconomowoc WI

Post Posted January 13th, 2018, 2:49 pm

.
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 61.0.2 - FF 62b17 - FF 63a - TB 52.9.1 - Mac OSX 10.13.6
Computers I've used: IBM 7094/UNIVAC 1108/IBM 360/DEC PDP11/DEC VAX-11 780/DEC VAXstation 8000/Sun SPARCstation 2/Mac from 1984 to 2018

Return to Thunderbird Support


Who is online

Users browsing this forum: Bing [Bot] and 3 guests