Problem recovering Thunderbird email, address book
Recently our hard disk failed so I did a complete OS replacement. In the process I upgraded from Lubuntu 22.04 LTS to 24.04 LTS. I think I was able to recover the old profile, and copied it to the new drive but the new version of Thunderbird (V128.3.1) is not able to access the old email folders or address book. Our old version of Thunderbird could so it wasn't a preexisting problem.
Examination of the error console revealed two error messages. The first, with its attendant details: NS_ERROR_FAILURE: Couldn't decrypt string crypto-SDR.sys.mjs:197
decrypt resource://gre/modules/crypto-SDR.sys.mjs:197 _decryptLogins resource://gre/modules/storage-json.sys.mjs:1032 findLogins resource://gre/modules/storage-json.sys.mjs:788 findLogins resource://gre/modules/LoginManager.sys.mjs:469 getRefreshToken resource:///modules/OAuth2Module.sys.mjs:143 _init resource:///modules/OAuth2Module.sys.mjs:136 _initFromPrefs resource:///modules/OAuth2Module.sys.mjs:85 initFromMail resource:///modules/OAuth2Module.sys.mjs:37 loadStartFolder chrome://messenger/content/messenger.js:770 InterpretGeneratorResume self-hosted:1417 AsyncFunctionNext self-hosted:804
The second: Uncaught NS_ERROR_FAILURE: Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIMsgMessageService.messageURIToMsgHdr]
displayMessage chrome://messenger/content/aboutMessage.js:173 openTab chrome://messenger/content/mailTabs.js:326 _cloneTemplate chrome://messenger/content/mailTabs.js:65
22 aboutMessage.js:173
displayMessage chrome://messenger/content/aboutMessage.js:173 openTab chrome://messenger/content/mailTabs.js:326 _cloneTemplate chrome://messenger/content/mailTabs.js:65
I have seen descriptions of similar problems that were solved by removing several files in the default profile directory: cert9.db, key4.db, logins.json and pkcs11.txt. In my case this did not work. I add that I didn't really delete them, I simply added ".xx" to the end of each file name.
My current version of Thunderbird is able to receive and send email messages so the problem appears to be some issue with the old profile. It's possible that some file(s) in the old profile is/are damaged, but running the Repair application (1) did not generate any error messages and (2) did not fix the problem.
I'd appreciate any suggestions/hints on where to go from here.
Όλες οι απαντήσεις (2)
You mention Ubuntu However, how did you download/install Thunderbird? Did you download from the office website, so the profile will be in the default location. Or did you use 'snap' or 'flatpak' because those versions have a different location for storing profile.
Basically, where was your Thunderbird original profile stored when using 22.04 LTS prior to disk failure ? The .thunderbird (might be called .mozilla-thunderbird) folder contains everything.
After fixing disk, upgrade to 24.04 LTS and installing Thunderbird - where is your current thunderbird profile located ?
Thunderbird download and install from official website puts it here: Linux and Unix Profile folders are located here: ~/.thunderbird/<Profile name>/
However, if you're using a third party build from Debian or Ubuntu, those builds store your profile folder here: ~/.mozilla-thunderbird/<Profile name>.
the ~ refers to home/username/
Flatpak puts it here : ~/.var/app/org.mozilla.Thunderbird/.thunderbird
Snap uses this location: /home/yourusername/snap/thunderbird/common/.thunderbird
When performing any manual copy paste Thundrebird must not be running. Address books - The default address books can be simply copied from one profile to another. Simply remove the empty default and paste in the original profile address book. They are located in the actual profile name folder. Personal Address Book is called 'abook.sqlite' Collected Addresses is called 'history.sqlite'
Any other address books you created would need to be imported. You could also import the two main address books if you don't like the manual option.
Tools > Import Select 'Import from a file' click on Continue Select 'Import Address Books' select 'SQLite database file (.sqlite) and click on continue locate old profile and select eg: abook-1.sqlite file and click on 'Open'
Now - if you want to add them to the exisitng Personal Address Book or any other address book already installed then select the option OR if you want to keep it independent, select the last option which may give it a name like 'abook' and clickon Continue
Once address book is seen in Address Book - you easily rename to something more suitable once you have discovered the contacts it contains therein.
Any address book such as a gmail address book can be hooked up to the server. eg: In Address Books Click on icon to 'Create a new address book' Select 'Add Carddav Address Book' Enter email address and location is auto entered click on 'Continue' Allows to select 'address book' and click on Continue
I found 'Address Book' was added to my list and then I right clicked on it to select 'Properties so I could edit the name to say 'Gmail Address Book'
When it comes to finding emails....
They will be located in the profile name folder - all Pop accounts and Local Folders will be in the 'Mail'.
If you used IMAP accounts and have lost emails off server then you might find mbox files in the 'ImapMail' folder in the relevant imap account folder.
mbox files (no extension) contain emails. files with .msf extension are just index files - not stored emails. folders with a .sbd extension may also contain mbox files. They are typically subfolders. You can import mbox files into pop accounts and Local Folders account. Do not attempt to import into a imap account - get them imported into Local Folders account. Once you have them on computer you should be able to read them and then if you really want, you can upload batches onto server using the right clickon highlighted emails and select 'Copy-to' and choose the imap folder. Note this uploading may take a while and some server have limits on the amount you can upload back onto server using imap.
Whilst it's possible to do a manual copy paste of all mbox files and .sbd folders - whilst Thunderbird is closed, there is an excellent addon extension called 'ImportExporttools NG' which is works very well. https://addons.thunderbird.net/en-us/thunderbird/addon/importexporttools-ng/
Thunderbird came as part of the 24.04 install. It is a snap package, and the profile was previously saved in ~/.thunderbird, so I created that directory.
I placed a copy of the old profile in that directory. Starting up Thunderbird for the first time, it was able to pull enough information out of that profile to set the correct IP addresses for sending/receiving email: but it did NOT pull in the old emails and address book. Using the tools dropdown and clicking on "import" doesn't work, reporting that it "failed unexpectedly" and suggested examining the error console. I did that and showed what I found, in my first message of this thread.
I note that, while I tried to recreate the old setup, my current Thunderbird settings use a profile in the ~/snap directory. But that profile looks like it was copied from ~/.thunderbird.
I do have some good news to report, though. I tried importing just the address book, instead of performing a wholesale import from an old profile: and that worked. Based on that success, I tried doing the same on _just_ the emails: and that worked, too!
So your comments did help. Thank you very much!