2013-06-19

Thunderbird "Work Offline" stops working after deleting an account

I was using Thunderbird (v14) to work with two different IMAP accounts.  I recently shut down the first account (as in the first IMAP account I added to Thunderbird), and wanted to get Thunderbird to stop trying to get mail from that account on startup, when checking mail, and when going to "work offline." I tried just deleting the account (Tools -> Account Settings -> Account Actions -> Remove Account), which worked to delete the account from Thunderbird, but after that Thunderbird suddenly stopped downloading messages from the server to work offline with my remaining account.  I would click the "work offline" icon, and it would go offline, but when I tried to open a message Thunderbird would say that the message contents had not been downloaded from the server.  I played around with the Synchronization & Storage settings to no avail.  Here is what ended up working for me to solve this.

  • I restored the prefs.js in my profile directory from a backup.  This got me back to where I had been before I deleted the first account, and back to the original problem of getting Thunderbird to not check for mail on the deactivated account.
  • I found this forum thread on the topic of getting Thunderbird to not check an account for new mail:
    http://forums.mozillazine.org/viewtopic.php?f=39&t=635510&start=15
  • I followed one person's advice from the thread to delete the deactivated account from the "mail.accountmanager.accounts" value in prefs.js (while Thunderbird was shut down) like so:
    Before edit (account enabled):
    user_pref("mail.accountmanager.accounts", "account1,account2,account3");
    after edit (account disabled):
    user_pref("mail.accountmanager.accounts","account3");
  • Note that figuring out which account is which in prefs.js takes a little scavenger hunt because the server information is saved under "identity" and then the identity is linked to the account. I figured out that my deactivated account was listed in prefs.js as both account1 and account2 (go figure).
  • I then also edited the value of mail.accountmanager.defaultaccount in prefs.js so that my remaining IMAP account was listed as the default account, like so:
    user_pref("mail.accountmanager.defaultaccount", "account2");
  • After I did this Thunderbird stopped trying to check for mail on my deactivated account, and, at least initially, successfully downloaded the contents of all my messages when I chose "work offline."
  • However, later in the day kept having intermittent problems with message bodies not being downloaded for use offline.  Sometimes it would work, sometimes it wouldn't, and I couldn't detect a pattern.
  • I did some more Googling and found an article called "Offline Folders" on Mozillazine.  I used the Config Editor (Preferences/Advanced/General/Config Editor) to change two settings discussed in the article:
        - I changed mail.imap.use_status_for_biff from true to false.
        - I changed mail.server.default.autosync_offline_stores from false to true
    According to the article this combination forces Thunderbird to download messages for offline use whenever you open it.
  • After I made that change it seemed like Thunderbird was downloading messages for use offline whenever I connected to the server, not just when I clicked the "work offline" icon. Also, sometimes when I went offline messages would still not yet be downloaded.  So I set mai.server.default.autosync_offline_stores to false again.
  • I noticed that mail.accountmanager.accounts somehow got account1 back, so I deleted account1 from that.
  • I also noticed that server2 had offline_stores set to false, so I set it to true, even though server2 is no longer used.



No comments: