|The extension adds two buttons on the main Thunderbird toolbar, one called "Xpunge" and another one called "MultiXpunge". Notice that the buttons are not visible by default, you will have to manually add them to the toolbar by following these instructions. Also, if you have not already done so, please read the following notice before installing this extension. The "Xpunge" button works on a single account, while "MultiXpunge" works on multiple accounts. "Xpunge" compacts all the folders of an account, so it provides the same functionality as the "File -> Compact Folders" menu item, not the "Compact This Folder" context menu item contained in the popup menu that appears when right-clicking on a single folder. "MultiXpunge" can be configured to compact individual folders as well as whole accounts. In order to use "Xpunge", you first have to select any folder in an account and then use the button to empty the trash folder and compact all the folders of that account. On the other hand, you do not have to select any folders before using "MultiXpunge", you can do it from any place in the Thunderbird window.|
|Xpunge also adds a sub-menu to Thunderbird's "Tool" menu, which can be used to
access the extension's preferences, call "Xpunge" or "MultiXpunge", and disable the timer.
The specifics of disabling the timer are explained later on this page, in the section about the "Timer" tab on the Preferences window.
|Before you can take advantage of Xpunge's functionality
you will have to configure its preferences. You can do that either by selecting the "Preferences"
menu item under Xpunge's menu or by opening the extensions window in Thunderbird
("Tools -> Add-ons"), selecting the Xpunge entry and then clicking on the "Preferences" button
below the extension's description.
The "Xpunge Preferences" window contains four tabs, labelled "Xpunge", "MultiXpunge", "Timer"
The "Xpunge" tab contains two checkboxes that control the "Empty Trash Folder" and the "Compact Folders" actions. The idea behind this extension ever since its conception was to use both actions, however they have been made optional for more flexibility. Both checkboxes are selected by default.
The "MultiXpunge" tab has two separate lists on the left side, one for selecting accounts that will have their Trash Can emptied and another one for selecting accounts/folders that will be compacted. There is a counter above each list that displays the total number of entries contained in the list. The drop-down list on the top right side contains all the accounts you have set up in Thunderbird and using the buttons you can add and remove accounts from the list on its left. The drop-down list on the bottom right side contains the complete folder tree of all the accounts set up in Thunderbird and using the buttons you can add and remove whole accounts or individual folders from the list on its left. The lists do not contain any entries by default so you will have to configure them before "MultiXpunge" can do something.
To add an account/folder, select it from one of the drop-down lists and click the respective "Add Selected" button. Note that when the "MultiXpunge" tab is opened, the drop-down lists already display the name of an account. However, the account is not considered selected (so the "Add Selected" buttons are disabled). You will have to expand a drop-down list and select an account/folder (either the one displayed or a different one) for the respective "Add Selected" button to become enabled. When an account is selected for compacting from the bottom drop-down list, " (whole)" is inserted after its name in the list, whereas a folder is followed by " on " and the name of the account it belongs to. The corresponding "Add Selected" button does not do any checking, so nothing prevents the user from selecting a whole account and also selecting individual folders from that account. No checks are done during compacting either, so in the case just described the selected folders would be compacted twice. It is up to the user to avoid this simple redundancy. Of course, you are not allowed to add the same account (or folder) more than once.
To remove an account/folder, select the corresponding row from a list on the left side and click the corresponding "Remove Selected" button. The lists do not allow selecting multiple entries.
There are also buttons labelled "Add All" and "Remove All" that allow the user to add or remove all the accounts from the corresponding lists. When the user clicks on a "Add All" button, all the existing entries of the corresponding list on the left are first deleted and all the available entries from the list on the right are then added. The entries added to the "Accounts/Folders To Be Compacted" list consist of a single entry for each available account (currently denoted as "whole") rather than a separate entry for each sub-folder of an account.
The "Add Selected", "Remove Selected", "Add All" and "Remove All" buttons become enabled/disabled according to where the user clicks on the window. Clicking on the "Selected Trash Cans To Be Emptied:" or the "Selected Folders/Accounts To Be Compacted:" text, enables the corresponding "Remove All" button. The same button is enabled if the user clicks inside the box of the lists themselves. If an entry of those lists is also selected (highlighted), the corresponding "Remove Selected" button should also become enabled. Note that clicking on a "Remove All" button will delete all the entries of the corresponding list, even if no account/folder of that list has been selected (since the functionality refers to "All" entries). Similarly, clicking on the "Choose Trash Can To Empty:" or the "Choose Folder To Compact:" text, enables the corresponding "Add All" button. The same button is enabled if the user clicks on the drop-down lists themselves. The corresponding "Add Selected" button should become enabled only when the user selects a specific entry from the "Choose Trash Can To Empty" or the "Choose Folder To Compact" drop-down lists. To disable all the buttons, just click somewhere in the empty area below the "Choose Trash Can To Empty" or the "Choose Folder To Compact" drop-down list.
All entries in all four lists display tooltips when the mouse pointer is placed over them, which contain additional information for each entry. In the (highly unlikely but "you know better") event that you have two accounts with the same name set up on Thunderbird, you can use the tooltips to distinguish them. This is the only case when multiple entries with the same name should exist in the lists.
If you delete an account that has been added to one of the two lists on the left side, the account will probably still be present in the list next time you open the Preferences window (although the account should not be processed if you use the "MultiXpunge" button). However, the deleted account should not be present in the list after you restart Thunderbird.
All accounts/folders are processed in the order they have been added to the respective list. The extension is supposed to skip IMAP accounts if Thunderbird is in offline mode.
The "Timer" tab controls the timer feature, which is completely detached from the functionality of the "MultiXpunge" button. This means that regardless of whether you are interested in the timer or not, you can just continue using the "MultiXpunge" (and the "Xpunge") button as usual. The timer feature is disabled by default.
The configuration is similar to that of the "MultiXpunge" tab, so you will first have to manually add some accounts in order for the timer to actually do something. As mentioned above, the accounts you add here are not connected in any way to the accounts you have configured the "MultiXpunge" button to process.
There are three extra elements in the "Timer" tab. One is a checkbox called "Enable the timer only on the first window", which controls whether the timer will be enabled on multiple Thunderbird windows. This applies to main Thunderbird windows (i.e. opened by right-clicking on a folder and selecting "Open in New Mail Window"), not the ones opened by right-clicking on a message and selecting "Open Message in New Mail Window", which do not contain a timer anyway. If this checkbox is checked (and it is, by default), only the first window will have a timer attached. In this case, if multiple windows are open and the one that was opened first is closed, there is no way to enable the timer on the rest of the windows for the current session. This is why users who like to have multiple windows open are given the choice to control this. However, enabling the timer on multiple windows and having it active through the preferences, means that there will be a separate timer running on each window opened subsequently, something that will result in the same timer actions (emptying trash/compacting folders) being repeated redundantly.
The two other extra elements are the checkboxes that actually control the timer, since the timer is activated/deactivated by them. They are unchecked by default and they actually remain disabled until at least one account/folder has been added to one of the two lists on the left.
The "Xpunge automatically ... minutes after startup ..." checkbox will be referred to as the "relative" timer and consists of two components, in the form of textboxes: an interval for the first expunction and an interval for subsequent expunctions, both defined in minutes. The intervals can be any integer from 0 to 99999 (which should be more than enough). If both intervals are larger than zero, say 1 and 30, then an expunction will occur 1 minute after the Thunderbird startup, and then an expunction will occur every 30 minutes after that, so at 31, 61 and so on minutes after Thunderbird startup. The user can select to expunge only once per session, by setting the second interval to 0 and the first interval to the desired number. If the first interval is 0 and the second one non-zero, say 30, then an expunction will occur every 30 minutes after Thunderbird startup, so at 30, 60 and so on minutes. If both intervals are 0, no expunction will happen. Both textboxes will reset their value to 0 whenever an invalid number is entered, but as mentioned above a value of 0 deactivates the timer, so the smallest "functional" interval is 1 minute. Note that when compacting large accounts, 1 minute may not be enough time for compacting to finish, so it is up to the user to define a reasonable interval for the timer.
The "Xpunge automatically every day at ..." checkbox, also known as the "absolute" timer, can be used to define a specific time of the day when expunction should occur. The time is defined in 24-hour format using the corresponding drop-down lists, one for the hours and one for the minutes. This timer feature is completely separate from the "relative" timer, so they can both be set at the same time. No check is performed for times that coincide.
The "relative" timer has been implemented in such a way that only the second interval has a "positive" effect on the current Thunderbird session. This means that changing the first interval through the preferences will not have any effect on the current session, unless it is set to 0, in which case the first expunction will not occur if it has not already done so. On the other hand, changing the second interval has both a "negative" (when set to zero) and a "positive" (when set to a positive integer) effect on the current session, and in the latter case the minutes start counting either right away or after the first expunction (if it has not occurred yet). The "absolute" timer has been implemented in such a way that changing the defined time takes immediate effect in the current Thunderbird session, so no restart is required.
The timer can be disabled for the duration of the current session through the "Timer" sub-menu of the Xpunge menu. So the "Disable Relative Timer (This Window Only)" menu item overrides the "Xpunge automatically ... minutes after startup ..." checkbox in the preferences window until Thunderbird is restarted. Similarly, the "Disable Absolute Timer (This Window Only)" menu item overrides the "Xpunge automatically every day at ..." checkbox in the preferences window until Thunderbird is restarted. Note that these menu items act only as "disable" options. When they are selected (checked) and the corresponding checkbox in the "Timer" preferences is also checked, the corresponding timer will be stopped. However, when they are deselected, the corresponding timer will not start running unless the corresponding checkbox in the "Timer" preferences is checked. Notice that the menu items control the timer of a single window only, whereas the preferences set up in the Preferences window are shared among multiple Thunderbird windows.
There are a few facts about the behaviour of both the "relevant" and the "absolute" timer that you should keep in mind. The "relative" timer (its second interval) does not start running at the time it is set up through the preferences (i.e. when the preferences are saved by clicking on the "OK" button). It runs for the first time after the specified interval has passed. The same thing happens when the "Disable Relative Timer Relative Timer (This Window Only)" menu item is deselected. If the checkbox in the preferences is checked, the timer will start running after the specified interval. A similar thing also happens when Thunderbird is first started if the checkbox in the "Timer" preferences is checked. The timer is set up immediately but does not run immediately. Instead, there is a delay equal to the specified interval before it runs for the first time. Also note that due to the way both timers are implemented, there might be a delay of (at most) one minute, compared to the defined time, before expunction occurs.
The "Settings" tab currently contains two sections, one for Xpunge and one for MultiXpunge. The only option currently available is to enable a confirmation dialog when Xpunge or MultiXpunge is called. This is a precautionary measure in case the Xpunge buttons are pressed by mistake or the menu items are selected by mistake. Both options are disabled by default so that they do not interfere with the setup of previous Xpunge releases, but any user who wishes to enable them can easily do so here.
|Known Issues and Troubleshooting|
|You can let me know what you think of the extension
or report any bugs you may have discovered by sending an email to: xpungetb at gmail dot com.
If you think you have found a bug, please open the "Error Console" in Thunderbird and look for any entries related to Xpunge (if you are using a filter in the console, search for the string "xpunge"). Please attach all such entries in your email reporting the bug to me.