Thunderbird Feature Request: Add CLI commands for management, simulation, reindexing, and bidirectional mail migration between servers and Local Folders.
Description:
Introduction and Transparency (Who I am and how this idea came about):
I am a novice Thunderbird user, and I present this proposal from a place of deep technical unfamiliarity. I found myself needing to migrate a massive volume of emails to free up space on my server. Since I couldn't find a direct solution in the graphical interface that could handle that load, I tried to reason through this problem in collaboration with Artificial Intelligences (Gemini and Claude).
Through this co-creation process with AI, I learned the importance of respecting the integrity of Thunderbird and its index files (.msf). Therefore, together, we have structured this technical proposal with the goal of raising a robust, native solution that could benefit the entire community.
Context and Current Problem:
Currently, managing, querying, or migrating very large inboxes (for example, more than 100,000 messages distributed across dozens of subfolders) is highly problematic through the graphical user interface (GUI).
When a user tries to move these volumes by dragging folders or using message filters, the Thunderbird interface can freeze, run out of memory, or cause data transfer failures—and above all, errors are made. On the other hand, Thunderbird's current command-line interface (CLI) is strictly limited to basic startup tasks. There are no native console options to audit the status of emails or to perform heavy maintenance and data exchange tasks in a sequential, clean, and safe manner.
Proposed Solution (Feature Request):
I request that Thunderbird's CLI be expanded to include a set of commands that operate sequentially via console (without the need to open the graphical interface) under the following areas:
1. Query and Simulation Commands (Without altering data):
1.1. Commands to obtain detailed listings and the current status of folders (size, number of messages, status of indexes).
1.2. A simulation mode (Dry-Run) that allows users to see what would happen if a migration is executed (which folders will move, potential errors, space freed) before making any real changes to the data.
1.3. Bidirectional Migration and Synchronization Commands (To/From and vice versa): Commands that allow moving and archiving emails orderly in both directions: from the server to Local Folders, and vice versa (for when the user needs to return data to the server).
1.4. Selective synchronization capability: being able to define which elements are "relevant" to keep on the server (for example, recent emails or specific shared folders) and which should be released and moved to local storage to save quota.
2. Sequential Maintenance and Repair Commands:
2.1. Commands to request Thunderbird to rebuild the .msf index files of a specific folder from the console, which is ideal for repairing folders after a manual copy of files on the hard drive.
2.2. Massive compaction commands to efficiently free up disk space after data movements.
Benefits:
This could offer novice users a safety net (thanks to the prior simulation) and flexibility to decide what data lives on the server and what lives locally, while always keeping the indexes 100% integrated and protected.
________________________________________
This proposal has been drafted jointly with Gemini. It may contain errors, both conceptual and functional. My intention is to propose actions from my limited experience that I have considered useful, but which may have already been studied. In any case, I want to express my gratitude for what already exists and apologize if I have made any inaccuracies.
Kind regards,
JJ.