Thunderbird forgets IMAP password during session

User Help for Mozilla Thunderbird
Post Reply
ese002
Posts: 5
Joined: August 27th, 2021, 3:22 pm

Thunderbird forgets IMAP password during session

Post by ese002 »

I recently upgraded to 78.13.0 on Gentoo. When I first start Thunderbird, it prompts for the IMAP password. This is normal. However, in prior versions, I never had to re-enter the password until I restarted Thunderbird. Now, after some moderate time (30 minutes?), Thunderbird seems to forget the password. It silently stops polling for new mail. Then, when I click on a folder because I am wondering why I haven't received any mail for a while, I get prompted for the password again. I type it correctly, and Thunderbird resumes automatic polling for new mail. It works for a while and the Thunderbird forgets the password again. This keeps repeating all day.

What's going on here? Is this a bug or some unfortunate new "feature"?
User avatar
tanstaafl
Moderator
Posts: 49647
Joined: July 30th, 2003, 5:06 pm

Re: Thunderbird forgets IMAP password during session

Post by tanstaafl »

I haven't heard of this before. Its not a new feature. Unclear yet if its a configuration specific bug or due to how the mail server was configured.

Does this occur with multiple accounts?

I realize you don't want to have Thunderbird store the password for you permanently, but what happens if you click on the checkbox to let it do that when prompted for the password? Does it prompt you for the password again 30 minutes later?

I suggest you check the checkbox for "allow immediate server notifications when new messages arrive" and see if that notifies you of new mail without having to press the check for new mail button. The checkbox enables use of the IMAP IDLE command which doesn't require polling to check for new mail.

I suggest you also right click in the folder pane on any folder (other than the inbox) where you expect to get new mail, select properties, and check "when getting new messages for this account always check this folder". That avoids having to open the folder to check for new mail in it.

Who is your email provider (gmail, outlook, yahoo etc.)?
ese002
Posts: 5
Joined: August 27th, 2021, 3:22 pm

Re: Thunderbird forgets IMAP password during session

Post by ese002 »

My other accounts do have the password stored. No complaints there. "allow immediate server notifications when new messages arrive" is already set. My account is served by my own Linux vps running dovecot. Looking through the logs, I see nothing unusual reported by Dovecot. The server software hasn't been updated for a while. It's overdue, really.

As of the writing, Thunderbird is actually behaving itself. I expect the issue will be back tomorrow.
ese002
Posts: 5
Joined: August 27th, 2021, 3:22 pm

Re: Thunderbird forgets IMAP password during session

Post by ese002 »

Indeed, it came back the next day and the next. Curiously, when it is worse right after Thunderbird starts up. I have had to reenter the password only about a minute after I entered it the first time. It looks like a multithreading problem. The password is not being shared between threads so the password has to be re-entered every time another thread is used to retrieve mail.
User avatar
tanstaafl
Moderator
Posts: 49647
Joined: July 30th, 2003, 5:06 pm

Re: Thunderbird forgets IMAP password during session

Post by tanstaafl »

They added multi-process (e10s) mode in 91.0. My impression was that the threading support in 78 was the same as prior versions. When you upgraded to 78.13.0 was it an upgrade from another version of 78.*?

Can you elaborate on why you think its a multi-threading problem? If you have N accounts with the same mail server it stores N copies of the password, it doesn't share them. It seems more like a Dovecot specific session problem since it only occurs with that one account.

I believe Dovecot supports OAuth2, but only with a OAuth2 provider such as google or facebook. So we couldn't experiment with switching to OAuth2 as a workaround. https://doc.dovecot.org/configuration_m ... on/oauth2/

You could try exiting Thunderbird, deleting key4.db (key database) and cert9.db and restarting but your problem is account specific and you can see the stored password. http://kb.mozillazine.org/Files_and_fol ... hunderbird
ese002
Posts: 5
Joined: August 27th, 2021, 3:22 pm

Re: Thunderbird forgets IMAP password during session

Post by ese002 »

I'm thinking multithreading in the sense that
1) Thread A spins up and needs a password. Prompt comes up and is answered but only thread A gets the password.
2) Later, thread B spins up. It doesn't have the password from thread A so it asks for it again.

It may or may not be a problem specific to Dovecot. The other accounts have saved passwords so the issue (if it happens) would not be visible. I will need to remove the saved passwords for either gmail or outlook to see if those are affected.

I also noticed that mail.check_all_imap_folders_for_new seems to be unreliable now seemingly independent of the password problem.
ese002
Posts: 5
Joined: August 27th, 2021, 3:22 pm

Re: Thunderbird forgets IMAP password during session

Post by ese002 »

I changed the dovecot account to use a saved password and outlook to not save the password. Now the dovecot account is well behaved and I have to keep typing the outlook password.
Post Reply