oAuth2 and Gmail

User Help for Mozilla Thunderbird
pftavares
Posts: 22
Joined: May 18th, 2022, 3:16 pm

Re: oAuth2 and Gmail

Post by pftavares »

An idea! I installed a virtual machine with my same operating system and started Thunderbird clean!
It all went well at the first try, just like Evolution did on my main system.
Conclusion -- there is "trash" in my profile that is keeping it from working properly with oAuth
I'm going to compare the contents of the virtual profile folder with my current profile folder.
Surely will need help on deciding what to delete without destroying everything!
I'll report soon!
pftavares
Posts: 22
Joined: May 18th, 2022, 3:16 pm

Re: oAuth2 and Gmail

Post by pftavares »

Some success! Your idea of the virtual machine was brilliant! Thanks!
I copied the folder from the virtual machine to the main system.
Now I have one profile folder in my main system that works.
It didn't even asked for the password! Logged in immediately!
But it hasn't my Local Folders and my Filters and many other minor costumizations I had.
Comparing this new folder to the original folder with FreeFileSync, there are hundreds of file differences.
I don't know what is safe to delete to NOT loose old emails...
What are the main file(s) to a successful login?
What can be safely deleted?
Can you please help in this final effort?
TIA
User avatar
tanstaafl
Moderator
Posts: 49647
Joined: July 30th, 2003, 5:06 pm

Re: oAuth2 and Gmail

Post by tanstaafl »

Congratulations.

Sure. http://kb.mozillazine.org/Files_and_fol ... hunderbird hasn't been updated for any new files added in version 60 and later such as the *.sqlite files used for the address books. But its a good starting point.

In general, any differences are files in the top directory of the profile. You shouldn't see any differences in the Imapmail and Mail child directories. Ignore any differences in the extensions, extensions-store, datareporting, browser-extension-data, minidumps, crashes, shader-cache and xulstore child directories. Ignore any child directories named after an extension (such as CardBook).

What directories are most of the hundreds of file differences in? What file extensions do most of them have?

I don't understand why Local Folders is hidden. You could try adding another one via the Local Folders add-on at https://addons.thunderbird.net/en-US/th ... src=search . My main concern would be the "Unsent Messages." folder in ..\Mail\Local Folders. Its name is displayed as Outbox and is used to queue messages when sending. You need it. See if you can send messages. If you can then you can live with the Outbox folder not being visible.

All of your old emails will be in ..\Mail and ..\ImapMail. Its possible to configure any account, including Local Folders, to be stored outside of the profile. Look at the Local Directory setting at the bottom of the accounts settings for that setting. Its next to a Browse button.
pftavares
Posts: 22
Joined: May 18th, 2022, 3:16 pm

Re: oAuth2 and Gmail

Post by pftavares »

Most of the files are in Cache (~6000) and cache2 (~4000) subfolders.
Are those safe to delete?
In the root of the profile folder I have these
abook.mab.bak
abook.v2.sqlite
addons.sqlite
blocklist-addons.json
blocklist-gfx.json
blocklist-plugins.json
blocklist.xml
cert8.db
content-prefs.sqlite
extensions.log
extensions.sqlite
history.mab.bak
history.v2.sqlite
junklog.html
key3.db
kinto.sqlite
localstore.rdf
logins-backup.json
mimeTypes.rdf
pluginreg.dat
search.json
secmod.db
SecurityPreloadState.txt
signons.sqlite
storage.sdb
Telemetry.ShutdownTime.txt
training.dat
traits.dat

Safe to delete?
Gone Postal
Posts: 501
Joined: December 2nd, 2008, 1:00 pm

Re: oAuth2 and Gmail

Post by Gone Postal »

You could always make a copy of the profile for the record, close Thunderbird, delete stuff from the existing profile and then re-start Thunderbird to see if it still works. If it doesn't then copy the files/folders back from the copied profile and try deleting something else.
User avatar
tanstaafl
Moderator
Posts: 49647
Joined: July 30th, 2003, 5:06 pm

Re: oAuth2 and Gmail

Post by tanstaafl »

"Most of the files are in Cache (~6000) and cache2 (~4000) subfolders."

I don't even have those directories in my profile because I configured tools -> preferences -> general -> disk space to "override automatic cache management" and set it to zero. Their contents should be safe to delete.

I never noticed any performance benefit when the cache was enabled and I don't re-read messages that frequently. However if you read mail while working offline you'd probably have missing images etc.

You could delete abook.mab.bak , history.mab.bak (backups of the *.mab address books before the contacts were moved to *.sqlite files) , junklog.html (optional log file), and mimetypes.rdf (it was replaced by a *.json file). Other than that I suggest you leave the root of the profile alone.
pftavares
Posts: 22
Joined: May 18th, 2022, 3:16 pm

Re: oAuth2 and Gmail

Post by pftavares »

I deleted all those files you indicated and also both cache folders and no harm was apparent in receiving mail.
But I lost all my filters... Probably deleted by accident an important file...
Can you please tell me where are / should filters get stored? I have a copy of the old non-authenticating profile!
Thanks!
User avatar
BuddhaNature
Posts: 537
Joined: January 3rd, 2008, 9:44 am
Location: Scotland

Re: oAuth2 and Gmail

Post by BuddhaNature »

Not an area of expertise for me but maybe these will help (remember, google is your friend, sometimes):

How to export and import message filters of Thunderbird

How can I get Thunderbird to read msgFilterRules.dat?

mozillaZine — Message Filters
OS: Windows 10 Pro. x64
pftavares
Posts: 22
Joined: May 18th, 2022, 3:16 pm

Re: oAuth2 and Gmail

Post by pftavares »

Thanks so much!
Found one (hopefully) last problem:
When I opened Thunderbird for the first time after the previous actions, all Extensions were disabled.
I enabled QuickFilters easily but when it came to Cardbook it wanted to do a login, and obviously failed...
It would be super if I could enable it in the virtual machine and then copy the necessary files to my system.
But what are the files that contain the Cardbook login token?
User avatar
BuddhaNature
Posts: 537
Joined: January 3rd, 2008, 9:44 am
Location: Scotland

Re: oAuth2 and Gmail

Post by BuddhaNature »

Cardbook? Beyond my ken I'm afraid. Someone might come along in time and answer your query. Or you could maybe try here: https://cardbook.icu/forum/forums/forum/main-forum/
OS: Windows 10 Pro. x64
User avatar
tanstaafl
Moderator
Posts: 49647
Joined: July 30th, 2003, 5:06 pm

Re: oAuth2 and Gmail

Post by tanstaafl »

I've used the CardBook add-on and it didn't require an additional login. But then I didn't configure it to use a remote address book (CardDAV, google, yahoo or apple). Perhaps you did. Whose login did it prompt you for?

See https://gitlab.com/CardBook/CardBook/-/ ... ess%20book
pftavares
Posts: 22
Joined: May 18th, 2022, 3:16 pm

Re: oAuth2 and Gmail

Post by pftavares »

Solved all problems!
Now all my Thunderbird profiles work with IMAP and oAuth2, have all my filters and all extensions working fine!
Thank you very much!
Last question -- should I upgrade (?) to Betterbird or should I stick with Thunderbird?
User avatar
tanstaafl
Moderator
Posts: 49647
Joined: July 30th, 2003, 5:06 pm

Re: oAuth2 and Gmail

Post by tanstaafl »

I prefer BetterBird because it adds some fixes that Thunderbird doesn't and they keep updating it. But its a personal choice. Either should meet your needs. I'm surprised you're considering it after all of the aggravation you just went through :)

I suggest you backup your profile and profiles.ini regardless of what you decide. If you want to switch to it I suggest you uninstall Thunderbird (be careful not to select the checkbox to remove its data) , and install Betterbird in the same directory that Thunderbird used.

https://www.betterbird.eu/#featuretable
pftavares
Posts: 22
Joined: May 18th, 2022, 3:16 pm

Re: oAuth2 and Gmail

Post by pftavares »

Again, Thank you!
User avatar
OldGrantonian
Posts: 181
Joined: May 12th, 2008, 11:02 pm
Location: Highlands

Re: oAuth2 and Gmail

Post by OldGrantonian »

.
pftavares wrote: Also a long time user of Thunderbird.
Why are you currently trying to create an account?

For example:

- New laptop
- Accidentally wrecked a recent account
- New hardware
- etc

Do you have any old backups ?

Thanks
Post Reply