Thunderbird: restore single email account coming from folder backup

Thunderbird configuration folder

All Thunderbird configuration, including stored and cached email messages, live in a folder named like "avc2zu39.default-release" in a hidden ".thunderbird" folder in your home folder. The first part of the name is a unique random string of characters for safety against automated hackers. All locally stored mail is under the "Mail" folder of that account. That includes mail that you may have dragged there from IMAP accounts for backup, or eventually mail downloaded from POP accounts. Mail from IMAP servers is cached in the folder "ImapMail". You will find subfolders for all your IMAP accounts.

Thunderbird mbox format

By default, Thunderbird used the mbox format to store mail. mbox files are formatted text files, and in the thunderbird storage, these files are named after the folder name you see in Thunderbird, without extension. They are paired with a file with the same name, but the .msf extension. These are index files. If you delete them, Thunderbird will recreate them the next time it is opened.

IMAP accounts are cached only

IMAP accounts are not designed to "live" on disk. Thunderbird makes a local copy of the mail headers and, depending of your account settings, also the mail content, in order to cache the content, i.e., be able to interact with it quickly. It then constantly synchronizes your updates with the IMAP server.

Recovering (some of) your IMAP mail from backup

So chances are that (part of) your mail of your IMAP account which is closed, still lives in the "Mail/yourmaildomain.com folder in your backup. The safest would be to create a folder "Old_IMAP" in Thunderbird under "Local Accounts. Then close Thunderbird. Under "Local Folders", you will find that folder as a file "Old_IMAP" and a folder "Old_IMAP.sbd". Now, copy the mbox files of your backup of your IMAP account to that "Old_IMAP.sbd" folder. Next time you start Thunderbird, you should find folders in that "Old_IMAP" folder, named according to the mbox files you added there, and containing whatever of your IMAP account that was locally cached at the time of backup.