I installed the Ubuntu distro under WSL2, and then installed thunderbird and gedit.
I started Thunderbird and it created a profile and launched the new account wizard. I added a Gmail IMAP account using default settings. I saw
* One account all of google popup that had my email address
* Then it wanted the password
* Then it wanted to confirm that TB can access the google account. Pressed Allow button
* Popup went away
* Saw blue Finish button in Thunderbird pane. Pressed it.
* Saw System integration popup. Enabled TB being default email client
No problem using the account. I confirmed the Gmail IMAP account is set to use OAuth authentication, and installed the Compact Headers add-on and the soft drawing paper theme. I exited Thunderbird and created a imap_log.sh script file in .thunderbird that contained
export MOZ_LOG=IMAP:5,timestamp
export MOZ_LOG_FILE=imap.log
thunderbird
I ran the script file from the .thunderbird directory using
bash imap_log.sh
It stored the data in imap.log.moz_log .
2022-05-23 14:19:22.700955 UTC - [Parent 10457: IMAP]: D/IMAP Try to log in
2022-05-23 14:19:22.700956 UTC - [Parent 10457: IMAP]: D/IMAP IMAP auth: server caps 0xc080c1625, pref 0x800000000, failed 0x0, avail caps 0x800000000
2022-05-23 14:19:22.700958 UTC - [Parent 10457: IMAP]: D/IMAP (GSSAPI = 0x1000000, CRAM = 0x20000, NTLM = 0x100000, MSN = 0x200000, PLAIN = 0x1000, LOGIN = 0x2, old-style IMAP login = 0x4, auth external IMAP login = 0x20000000, OAUTH2 = 0x800000000)
2022-05-23 14:19:22.700958 UTC - [Parent 10457: IMAP]: D/IMAP Trying auth method 0x800000000
2022-05-23 14:19:22.701768 UTC - [Parent 10457: IMAP]: D/IMAP IMAP: trying auth method 0x800000000
2022-05-23 14:19:22.701773 UTC - [Parent 10457: IMAP]: D/IMAP XOAUTH2 auth
2022-05-23 14:19:22.845467 UTC - [Parent 10457: IMAP]: I/IMAP 7f93f6d13000:imap.gmail.com:NA:SendData: Logging suppressed for this command (it probably contained authentication information)
2022-05-23 14:19:22.896512 UTC - [Parent 10457: IMAP]: I/IMAP 7f93f6e29800:imap.gmail.com:NA:SendData: Logging suppressed for this command (it probably contained authentication information)
2022-05-23 14:19:23.623104 UTC - [Parent 10457: IMAP]: D/IMAP ReadNextLine [rv=0x0 stream=7f93fb4118b0 nb=218 needmore=0]
2022-05-23 14:19:23.623113 UTC - [Parent 10457: IMAP]: I/IMAP 7f93f6d13000:imap.gmail.com:NA:CreateNewLineFromSocket: * CAPABILITY IMAP4rev1 UNSELECT IDLE NAMESPACE QUOTA ID XLIST CHILDREN X-GM-EXT-1 UIDPLUS COMPRESS=DEFLATE ENABLE MOVE CONDSTORE ESEARCH UTF8=ACCEPT LIST-EXTENDED LIST-STATUS LITERAL- SPECIAL-USE APPENDLIMIT=35651584
2022-05-23 14:19:23.623115 UTC - [Parent 10457: IMAP]: D/IMAP SetConnectionStatus(0x0)
2022-05-23 14:19:23.623190 UTC - [Parent 10457: IMAP]: D/IMAP ReadNextLine [rv=0x0 stream=7f93fb4118b0 nb=48 needmore=0]
2022-05-23 14:19:23.623194 UTC - [Parent 10457: IMAP]: I/IMAP 7f93f6d13000:imap.gmail.com:NA:CreateNewLineFromSocket: 27 OK USERNAME@gmail.com authenticated (Success)
2022-05-23 14:19:23.623195 UTC - [Parent 10457: IMAP]: D/IMAP SetConnectionStatus(0x0)
2022-05-23 14:19:23.623202 UTC - [Parent 10457: IMAP]: D/IMAP login succeeded
I edited the above excerpt to replace my username with USERNAME. I got the following chatter in the terminal window when starting Thunderbird:
eric@DESKTOP-K8K60RO:~/.thunderbird$ thunderbird
[calBackendLoader] Using Thunderbird's libical backend
[LDAPModuleLoader] Using LDAPDirectory.jsm
[MsgSendModuleLoader] Using MessageSend.jsm
[SmtpModuleLoader] Using SmtpService.jsm
console.debug: WebExtensions:
Compact Headers loaded
console.debug: "Trying to load /usr/lib/thunderbird/libotr.so"
console.debug: "Trying to load libotr.so from system's standard library locations"
console.debug: "Trying to load libotr.so.5 from system's standard library locations"
console.debug: "Trying to load libotr.so from system's standard library locations"
console.log: (new Error("Cannot load required OTR library", "resource:///modules/OTRLib.jsm", 109))
console.debug: "Successfully loaded OpenPGP library librnp.so version 0.16+git20220124.f06439f7.MZLA from /usr/lib/thunderbird/librnp.so"
console.debug: "Found 0 public keys and 0 secret keys (0 protected, 0 unprotected)"
console.debug: "Successfully loaded optional OpenPGP library libgpgme.so.11 from system's standard library locations"
console.debug: "gpgme version: 1.13.1-unknown"
console.warn: services.settings: thunderbird/hijack-blocklists has signature disabled
I didn't use setenv MOZ_LOG_FILE /tmp/imap.log since I'm still learning how to use WSL. I noticed four empty child log files such as /home/eric/.thunderbird/imap.log.child-1.moz_log , no idea why they were created. imap.log.moz_log has the data.
eric@DESKTOP-K8K60RO:~/.thunderbird$ cat /etc/os-release
NAME="Ubuntu"
VERSION="20.04 LTS (Focal Fossa)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 20.04 LTS"
VERSION_ID="20.04"
HOME_URL="
https://www.ubuntu.com/"
SUPPORT_URL="
https://help.ubuntu.com/"
BUG_REPORT_URL="
https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="
https://www.ubuntu.com/legal/terms-and- ... acy-policy"
VERSION_CODENAME=focal
UBUNTU_CODENAME=focal