Files
oam/knowledge base/thunderbird.md

8.0 KiB

Mozilla Thunderbird

  1. TL;DR
  2. Profiles
    1. Profile manager
    2. Backing up profiles
    3. Restoring profiles from backups
  3. Troubleshooting
    1. Create a dummy account
    2. Convert an account's message store type from one file per folder (mbox) to one file per message (maildir)
    3. Rebuild the Global Database for a Profile
    4. You are already subscribed to this feed
  4. Further readings
  5. Sources

TL;DR

Default directories path:

Directory Linux Mac OS X Windows
Binaries /usr/bin /Applications/Thunderbird.app/Contents/MacOS C:\Program Files\Mozilla Thunderbird
Data ${HOME}/.thunderbird ${HOME}/Library/Thunderbird %APPDATA%\Roaming\Thunderbird
Profiles ${HOME}/.thunderbird ${HOME}/Library/Thunderbird/Profiles %APPDATA%\Roaming\Thunderbird\Profiles

Add-ons:

Add-on Description
ImportExportTools NG Tools to import/export messages and folders.
Remove Duplicate Messages Search and remove duplicate messages in your mail folders.

Profiles

Sets of files where Thunderbird saves personal information such as messages, passwords and user preferences.
One can have multiple profiles, each containing a separate set of user information.

The Profile Manager allows to create, remove, rename, and switch profiles.

Profile manager

When Thunderbird is open:

  1. Open the hamburger menu on the top right, or look at the menu bar.
  2. Choose Help > Troubleshooting Information.
  3. On the page that opens, click the about:profiles link.

When Thunderbird is closed:

${THUNDERBIRD_BIN_DIR}/thunderbird --ProfileManager
${THUNDERBIRD_BIN_DIR}/thunderbird-bin -P

Backing up profiles

  1. Close Thunderbird if it is open.

  2. Copy the profile folder to another location:

    cp -a "${THUNDERBIRD_PROFILES_DIR}/we12yhij.default" "/Backup/Thunderbird/we12yhij.default"
    

Restoring profiles from backups

  1. Close Thunderbird if it is open.

  2. If the existing profile folder and the profile backup folder have the same name, replace the existing profile folder with the profile backup folder:

    rm -fr "${THUNDERBIRD_PROFILES_DIR}/we12yhij.default"
    cp -a "/Backup/Thunderbird/we12yhij.default" "${THUNDERBIRD_PROFILES_DIR}/we12yhij.default"
    

    Important: The profile folder names must match exactly for this to work, including the random string of 8 characters.

  3. If the profile folder names do not match, or to move or restore a profile to a different location:

    1. Use the Profile Manager to create a new profile in the desired location, then exit the Profile Manager.

    2. Open the profile's backup folder.

    3. Copy the entire contents of the profile's backup folder.
      This includes the mimeTypes.rdf, prefs.js and the other files.

    4. Locate and open the new profile folder.

    5. Paste the copied contents into the new profile's folder.
      Overwrite existing files of the same name.

    6. Open up the profiles.ini file in the application data folder in a text editor.

      vim "${THUNDERBIRD_DATA_DIR}/profiles.ini"
      
    7. Check the Path= line for the profile is correct.

  4. Start Thunderbird.

Troubleshooting

Create a dummy account

  1. Go to Menu > Account Settings.
  2. Account Actions > Add Mail Account….
  3. Insert any valid, but not necessarily existing, email address in the email field.
    dummy@example.com is more than fine.
  4. Hit Configure manually as it appears in the wizard.
  5. In the Incoming Server configuration, ensure to set it to POP3 and not IMAP. You can safely ignore the rest of the server configuration as it is not needed.
  6. Hit Advanced config and confirm to create the new dummy account.
  7. In the dummy account settings, under Server Settings, disable the automatic check for, and download of, new messages on the server.

Convert an account's message store type from one file per folder (mbox) to one file per message (maildir)

  1. Create a new dummy account.
  2. Move all the messages to the dummy account.
  3. Delete the old account.
  4. Recreate the old account.

    Make sure to select its message store type correctly in the advanced options before it starts downloading messages.

  5. Move all the messages back.
  6. Delete the dummy account.

Rebuild the Global Database for a Profile

The Global Database is the indexing system that enables Thunderbird to search messages.
Rebuilding the Global Database re-indexes messages and address book cards. Newsgroup messages are not indexed.

Reasons for rebuilding the Global Database include:

  • The database may have been corrupted.
  • The search index may not be functioning correctly, such as displaying blank results or performing poorly.
  • The database is too big and needs to be reduced in size.
  • The Global Database file becomes fragmented, which reduces index performance.

Rebuilding the database will not automatically reduce the size of the index.
It will only shrink if there are fewer messages to index since it was last updated, which can be accomplished by deleting messages or disabling message sync for an account or folder.

Steps to rebuild the Global Database:

  1. Quit Thunderbird.

  2. Delete the global-messages-db.sqlite file in the Thunderbird Profile you want to rebuild the index for.

    rm "${THUNDERBIRD_PROFILES_DIR}/we12yhij.default/global-messages-db.sqlite"
    
  3. Start Thunderbird.

The re-indexing process will start automatically.
Depending on the number of messages, it might take some time for the indexing to complete; performance might be affected, and the search will return only partial results or even no results until the indexing is complete.

The indexing progress can be monitored through Tools > Activity Manager.

You are already subscribed to this feed

The feed list file is still containing the URL of the feed one is trying to add.

Remove the feed object from the 'Mail/Blog & News Feeds/feeds.json' file in your profile:

# Just examples. Check what the command does.
jq 'del(.[1:4])' 'Mail/Blog & News Feeds/feeds.json'

Further readings

Sources