Difference between revisions of "Thunderbird"

From WPKG | Open Source Software Deployment and Distribution
Jump to: navigation, search
(improved instructions on getting extension ID; removed old -install-global-extension script)
(Added 'Disable 'Auto-sync' and 'Work Offline'' + lots of tidyup)
Line 1: Line 1:
== Thunderbird 3.1 ==
+
Mozilla Thunderbird is an email client available from [http://www.mozillamessaging.com]. It has the ability to install various extensions for example the Lightning calendar.
Version 3.1 is out [http://www.mozillamessaging.com]. It install itself the same way version 2.0 so see below.
+
 
 +
=WPKG Installers=
 +
 
 +
== Thunderbird 3.x ==
 +
Versions 3.0 and 3.1 install the same way as version 2.0. This installer first kills a running Thunderbird in case WPKG is being run whilst you're logged in.
 +
 
 
<source lang="xml">
 
<source lang="xml">
 
<package  
 
<package  
 
   id="thunderbird"   
 
   id="thunderbird"   
 
   name="Mozilla Thunderbird"   
 
   name="Mozilla Thunderbird"   
   revision="310"   
+
   revision="1"   
 
   reboot="false"   
 
   reboot="false"   
 
   priority="0">
 
   priority="0">
Line 11: Line 16:
 
   <check type="uninstall" condition="exists" path="Mozilla Thunderbird (3.1)" />
 
   <check type="uninstall" condition="exists" path="Mozilla Thunderbird (3.1)" />
 
   
 
   
   <install cmd='"%SOFTWARE%\internet\Thunderbird Setup 3.1.exe" -ms' />
+
   <install cmd='"%SOFTWARE%\thunderbird\Thunderbird Setup 3.1.exe" -ms' />
 
   
 
   
 
   <upgrade cmd='taskkill /F /IM thunderbird.exe'>
 
   <upgrade cmd='taskkill /F /IM thunderbird.exe'>
Line 17: Line 22:
 
     <exit code="128" />
 
     <exit code="128" />
 
   </upgrade>
 
   </upgrade>
   <upgrade cmd='"%SOFTWARE%\internet\Thunderbird Setup 3.1.exe" -ms' />
+
 
 +
   <upgrade cmd='"%SOFTWARE%\thunderbird\Thunderbird Setup 3.1.exe" -ms' />
 
   
 
   
 
   <remove cmd='taskkill /F /IM thunderbird.exe'>
 
   <remove cmd='taskkill /F /IM thunderbird.exe'>
Line 23: Line 29:
 
     <exit code="128" />
 
     <exit code="128" />
 
   </remove>
 
   </remove>
 +
 
   <remove cmd='"%PROGRAMFILES%\Mozilla Thunderbird\uninstall\helper.exe" /S' />
 
   <remove cmd='"%PROGRAMFILES%\Mozilla Thunderbird\uninstall\helper.exe" /S' />
 
</package>
 
</package>
Line 28: Line 35:
  
 
== Thunderbird 2.x ==
 
== Thunderbird 2.x ==
 
If you have a previous version of Thunderbird installed, it will be automatically removed before the latest version is installed.
 
 
As the Thunderbird install now nicely upgrades and doesn't leave the old one in the registry, there is no need to differentiate versions in package id.
 
 
When a new version comes out, just replace the installer in "upgrade cmd" with a new one, and then increment the package revision number - this puts the upgrade command to work.
 
  
 
<source lang="xml">
 
<source lang="xml">
Line 65: Line 66:
 
</source>
 
</source>
  
== Making Thunderbird a default mail and news client ==
+
= Making Thunderbird the default mail and news client =
  
 
If you want to make Mozilla Thunderbird a default mail and news client, add these registry entries:
 
If you want to make Mozilla Thunderbird a default mail and news client, add these registry entries:
Line 110: Line 111:
 
</source>
 
</source>
  
To register it with WPKG, save it as thunderbird.REG, and add these entries to your Thunderbird XML:
+
To register it with WPKG, save it as thunderbird.reg, and add these entries to your Thunderbird WPKG item:
  
 
<source lang="xml">
 
<source lang="xml">
   <install cmd='regedit /s %SOFTWARE%\Thunderbird\thunderbird.REG' />
+
   <install cmd='regedit /s %SOFTWARE%\Thunderbird\thunderbird.reg' />
 
    
 
    
   <upgrade cmd='regedit /s %SOFTWARE%\Thunderbird\thunderbird.REG' />
+
   <upgrade cmd='regedit /s %SOFTWARE%\Thunderbird\thunderbird.reg' />
 
</source>
 
</source>
 
  
 
Alternatively, you can use this jscript file to use full path names:
 
Alternatively, you can use this jscript file to use full path names:
Line 208: Line 208:
  
  
And then add this to your XML package definition:
+
Then add this to your WPKG installer:
  
 
<source lang="xml">
 
<source lang="xml">
Line 216: Line 216:
  
  
== Silent installation of Thunderbird extensions ==
+
= Silent installation of Thunderbird extensions =
  
To silently install Mozilla Thunderbird extensions, do the following:
+
To silently install Thunderbird extensions, do the following:
  
 
* Download the extension
 
* Download the extension
Line 249: Line 249:
 
When Thunderbird is next started, the new extension is detected automatically - you can verify this in Thunderbird using Tools -> Extensions.
 
When Thunderbird is next started, the new extension is detected automatically - you can verify this in Thunderbird using Tools -> Extensions.
  
== Silent installation of dictionaries (spell-checking) ==
+
= Silent installation of dictionaries (spell-checking) =
  
=== Thunderbird 1.5 ===
+
== Thunderbird 1.5 ==
  
 
Mozilla Thunderbird keeps its (MySpell) dictionaries in <code>%PROGRAMFILES%\Mozilla Thunderbird\components\myspell\</code>.
 
Mozilla Thunderbird keeps its (MySpell) dictionaries in <code>%PROGRAMFILES%\Mozilla Thunderbird\components\myspell\</code>.
Line 259: Line 259:
 
Installing a new dictionary is simple - just copy the dictionary files for a given language to that folder.
 
Installing a new dictionary is simple - just copy the dictionary files for a given language to that folder.
  
'''Installation instructions for a German dictionary'''
+
===Installing a German dictionary===
  
 
* Download a German dictionary from http://www.thunderbird-mail.de/hilfe/dokumentation1.5/allg_rechtschreibung.php
 
* Download a German dictionary from http://www.thunderbird-mail.de/hilfe/dokumentation1.5/allg_rechtschreibung.php
 
* The file is a .xpi file (a renamed .zip file). Uncompress it using any unzipping program. Inside you'll find .aff and .dic files - these are the core dictionary files. (There is also a .txt file (some info), and a .js file (the installer, used if you install the dictionary using Thunderbird))
 
* The file is a .xpi file (a renamed .zip file). Uncompress it using any unzipping program. Inside you'll find .aff and .dic files - these are the core dictionary files. (There is also a .txt file (some info), and a .js file (the installer, used if you install the dictionary using Thunderbird))
 
* Copy the core dictionary files into <code>%PROGRAMFILES%\Mozilla Thunderbird\components\myspell\</code>.
 
* Copy the core dictionary files into <code>%PROGRAMFILES%\Mozilla Thunderbird\components\myspell\</code>.
* The XML which installs the German dictionary for Thunderbird should look like this:
+
* The WPKG installer to install this dictionary into Thunderbird should look like this:
  
 
<source lang="xml">
 
<source lang="xml">
Line 286: Line 286:
 
</source>
 
</source>
  
=== Thunderbird 2.0 ===
+
== Thunderbird 2.0 ==
  
 
Thunderbird 2.0 has its dictionaries in %PROGRAMFILES%\Mozilla Thunderbird\dictionaries
 
Thunderbird 2.0 has its dictionaries in %PROGRAMFILES%\Mozilla Thunderbird\dictionaries
Line 301: Line 301:
 
</source>
 
</source>
  
Alternatively, download the Thunderbird Dictionary (download the right one, i.e. the german dictionary from the official webpage won't work) and install it like this:
+
Alternatively, download the Thunderbird dictionary (download the right one, i.e. the German dictionary from the official webpage won't work) and install it like this:
  
 
<source lang="dos">
 
<source lang="dos">
Line 307: Line 307:
 
</source>
 
</source>
  
== Disable auto update ==
+
=Thunderbird Configuration=
  
Thunderbird processes the config files in reverse alphabetical order.
+
== Types Of Prefs ==
Create a file called, for example, all-thunderbird-custom-disable-updates.js, saved in %PROGRAMFILES%\Mozilla thunderbird\defaults\pref\, containing the following:
+
  
<source lang="xml">
+
userpref("pref",<value>); - per-user preferences
// ***********************************************************************
+
  
// *                                                                    *
+
pref("pref",<value>); - system-wide preferences that can be over-ridden by users
  
// * all-thunderbird-custom-disable-updates.js -                                *
+
lockpref("pref",<value>); - system-wide preferences that cannot be over-ridden by users
  
// * Thunderbird custom global configuration to disable updates              *
 
  
// *                                                                    *
+
== Methods Of Applying Prefs ==
  
// ***********************************************************************
+
===Per-person===
  
 +
Use a prefs file in the user's profile directory. You shouldn't edit prefs.js, as that can be overwritten by Thunderbird, instead create and use user.js as that will never be altered by Thunderbird itself. Use the syntax userpref("pref",<value>); here.
  
// Options -> Advanced -> Update -> Automatically check for updates to : Installed Extensions and Themes
+
===System-wide===
  
pref("extensions.update.enabled", false);
+
====File in %PROGRAMFILES%\Mozilla thunderbird\defaults\pref\ directory====
  
 +
Thunderbird processes the config files in this directory in reverse alphabetical order. Don't add your prefs to Thunderbird's own pref files as these will be lost on an upgrade of Thunderbird, instead create a file called, for example, all-thunderbird-custom.js, saved in %PROGRAMFILES%\Mozilla thunderbird\defaults\pref\. These preferences can be over-ridden by users. An example file is:
  
 
+
<source lang="xml">
// Options -> Advanced -> Update -> Automatically check for updates to : Thunderbird
+
// Options -> Advanced -> Update -> Automatically check for updates to : Installed Extensions and Themes
 
+
pref("extensions.update.enabled", false);
pref("app.update.enabled", false);
+
 
+
 
+
 
+
// Options -> Advanced -> Update -> Automatically check for updates to : Search Engines
+
 
+
pref("browser.search.update", false);
+
 
+
 
</source>
 
</source>
 
See the whole "HowTO prevent Autoupdate on Firefox / Thunderbird" thread: http://lists.wpkg.org/pipermail/wpkg-users/2007-February/001207.html
 
 
See bug [https://bugzilla.mozilla.org/show_bug.cgi?id=395660].
 
 
== Removing access to Outlook Express ==
 
 
If you want to remove access to OE, see [[Outlook Express]].
 
  
  
== Using thunderbird autoconfig ==
+
==== Autoconfig ====
  
 
See: http://mit.edu/~thunderbird/www/maintainers/autoconfig.html
 
See: http://mit.edu/~thunderbird/www/maintainers/autoconfig.html
Line 369: Line 352:
 
</source>
 
</source>
  
''Note: Byteshifting does not seem to be required with versions 1.5.* or 2.0.*''
+
The file can optionally be byteshifted an optional security feature, using general.config.obscure_value.
  
 
You can add functionality to the prefs by including javascript within the file.
 
You can add functionality to the prefs by including javascript within the file.
Line 446: Line 429:
 
}
 
}
 
</source>
 
</source>
 +
 +
 +
== Prefs ==
 +
 +
 +
=== Disable Auto Update ===
 +
 +
<source lang=javascript>
 +
// Options -> Advanced -> Update -> Automatically check for updates to : Installed Extensions and Themes
 +
pref("extensions.update.enabled", false);
 +
 +
// Options -> Advanced -> Update -> Automatically check for updates to : Thunderbird
 +
pref("app.update.enabled", false);
 +
 +
// Options -> Advanced -> Update -> Automatically check for updates to : Search Engines
 +
pref("browser.search.update", false);
 +
</source>
 +
 +
See the whole "HowTO prevent Autoupdate on Firefox / Thunderbird" thread: http://lists.wpkg.org/pipermail/wpkg-users/2007-February/001207.html
 +
 +
See bug [https://bugzilla.mozilla.org/show_bug.cgi?id=395660].
 +
 +
 +
 
=== Disable Migration Assistant and What's New page ===
 
=== Disable Migration Assistant and What's New page ===
To prevent the Migration Assistant and the What's New page from showing after upgrades add the following lines to your thunderbird.cfg.
+
 
 +
To prevent the Migration Assistant and the What's New page from showing after upgrades, use:
 +
 
 
<source lang=javascript>
 
<source lang=javascript>
 +
pref("mail.ui.show.migration.on.upgrade", false);
 +
pref("app.update.showInstalledUI", false);
 +
pref("browser.startup.homepage_override.mstone", "ignore");
 +
pref("mailnews.start_page_override.mstone", "ignore");
 +
</source>
  
lockPref("mail.ui.show.migration.on.upgrade", false);
+
 
lockPref("app.update.showInstalledUI", false);
+
===Disable 'Auto-sync' and 'Work Offline'===
lockPref("browser.startup.homepage_override.mstone", "ignore");
+
Tame Thunderbird 3.0.5 or 3.1.0 so that it doesn't automatically sync IMAP mail to a person's workstation in an organisation because they have roaming user profiles on Windows that would result in C: partitions filling up. There is the old 'work offline' and the new 'auto-sync'. We want neither. Thunderbird's IMAP sync feature gives minimal improvement for a lot of pain.
lockPref("mailnews.start_page_override.mstone", "ignore");
+
 
 +
References:
 +
* http://kb.mozillazine.org/Thunderbird_3.0_-_New_Features_and_Changes#IMAP_Accounts
 +
* https://developer.mozilla.org/en/Thunderbird/Deploying_Thunderbird_in_the_Enterprise/Upgrading_Thunderbird_in_the_Enterprise
 +
* 'If I disable migration wizard I'm in situation where all IMAP -folders are set to download no matter what I do to account in question (Needs a way to keep offline-use setting upon migration to Tb 3, even if Migration Assistant is disabled on purpose)' - https://bugzilla.mozilla.org/show_bug.cgi?id=562589. This is fixed in 3.0.5 and 3.1.
 +
 
 +
 
 +
* Don't 'keep messages for this account on this computer' (a 'work offline' setting)
 +
GUI: 'Synchronisation & Storage -> Message Synchronising -> [] keep messages for this account on this computer'
 +
 
 +
Various prefs relevant to this: mail.server.default.offline_download (on by default, unless specifically turned off by the use of mail.server.serverX.offline_download)
 +
 
 +
Don't confuse this with 'auto-sync, this just allows them to be downloaded when go offline or close Thunderbird. Auto-sync bypasses this setting like one big version equivalent to this.
 +
 +
Controls whether or not newly created folders get flagged for downloading offline [TB 3.0.0 - 3.0.4]; additionally in TB 3.0.5+, setting to "false" prior to first run of TB 3 will prevent the IMAP folders from being set to offline download (which they would otherwise have been by default)
 +
 
 +
You need to turn this off _before_ the migration from Thunderbird 2 to 3.0.5+ else auto-sync will be enabled upon migration. In 3.0.0 - 3.0.4 auto-sync would be enabled anyway.
 +
 
 +
<source lang=javascript>
 +
pref("mail.server.default.offline_download", false);
 +
</source>
 +
 
 +
 
 +
* Don't 'Synchronize all messages locally regardless of age' (an 'auto-sync' setting)
 +
GUI: 'Synchronisation & Storage -> Disk Space -> Synchronize all messages locally regardless of age - off'
 +
 
 +
Various prefs relevant to this:
 +
mail.server.default.autosync_offline_stores - false
 +
 
 +
mail.server.serverX.autosync_offline_stores - false
 +
 
 +
? Also there should be no mail.server.serverX.autosync_offline_stores=true ?
 +
 
 +
If the above setting is made, folder property of offline-use=on/off becomes irrelevant to auto-sync because auto-sync is disabled, and the offline-use=on/off is used for download at "Work Offline" only.
 +
 +
This ignores whether the folder is configured as an offline folder or not.
 +
 
 +
See http://kb.mozillazine.org/Offline_folders#AutoSync
 +
 
 +
<source lang=javascript>
 +
pref("mail.server.default.autosync_offline_stores", false);
 +
</source>
 +
 +
 
 +
* 'Synchronise the most recent [1] [Days]' (a 'work offline' setting)
 +
GUI: 'Synchronisation & Storage -> Disk Space -> (*) Synchronise the most recent [1] [Days]'
 +
 
 +
<source lang=javascript>
 +
pref("mail.server.default.autosync_max_age_days", 1);
 +
</source>
 +
 
 +
 
 +
* 'Don't download messages larger than 50KB' (a 'work offline' setting)
 +
GUI: Synchronisation & Storage -> Disk Space -> [*] Don't download messages larger than 50KB
 +
 
 +
Various prefs relevant to this:
 +
 
 +
mail.server.default.limit_offline_message_size - true (defaults to 50KB)
 +
 
 +
mail.server.serverX.limit_offline_message_size - true (defaults to 50KB)
 +
 
 +
mail.server.default.max_size - XXX
 +
 
 +
mail.server.serverX.max_size - XXX
 +
 
 +
<source lang=javascript>
 +
pref("mail.server.default.limit_offline_message_size", true);
 +
</source>
 +
 
 +
 
 +
* Disable the Migration Assistant
 +
Prevents users being asked if they want to enable auto-sync. Available in Thunderbird 3.1 and onwards.
 +
We could lock this pref using lockpref, which is an option that should be considered, but that would prevent the option from _ever_ being used and there might be an occasional sane situation in which to use it, for example roaming users with laptops.
 +
 
 +
<source lang=javascript>
 +
pref("mail.ui.show.migration.on.upgrade", false);
 
</source>
 
</source>
  
 
[[category:Silent Installers]]
 
[[category:Silent Installers]]

Revision as of 10:40, 15 July 2010

Mozilla Thunderbird is an email client available from [1]. It has the ability to install various extensions for example the Lightning calendar.

WPKG Installers

Thunderbird 3.x

Versions 3.0 and 3.1 install the same way as version 2.0. This installer first kills a running Thunderbird in case WPKG is being run whilst you're logged in.

<package 
  id="thunderbird"  
  name="Mozilla Thunderbird"  
  revision="1"  
  reboot="false"  
  priority="0">
 
  <check type="uninstall" condition="exists" path="Mozilla Thunderbird (3.1)" />
 
  <install cmd='"%SOFTWARE%\thunderbird\Thunderbird Setup 3.1.exe" -ms' />
 
  <upgrade cmd='taskkill /F /IM thunderbird.exe'>
    <exit code="0" />
    <exit code="128" />
  </upgrade>

  <upgrade cmd='"%SOFTWARE%\thunderbird\Thunderbird Setup 3.1.exe" -ms' />
 
  <remove cmd='taskkill /F /IM thunderbird.exe'>
    <exit code="0" />
    <exit code="128" />
  </remove>

  <remove cmd='"%PROGRAMFILES%\Mozilla Thunderbird\uninstall\helper.exe" /S' />
</package>

Thunderbird 2.x

<package 
      id="thunderbird" 
      name="Mozilla Thunderbird 2.0.0.24" 
      revision="XXX" 
      reboot="false" 
      priority="0">
 
  <check type="uninstall" condition="exists" path="Mozilla Thunderbird (2.0.0.24)" />
 
  <install cmd='taskkill /F /IM thunderbird.exe'>
    <exit code="0" />
    <exit code="128" />
  </install>
  <install cmd='"%SOFTWARE%\Thunderbird\Thunderbird Setup 2.0.0.24.exe" -ms' />
 
  <upgrade cmd='taskkill /F /IM thunderbird.exe'>
    <exit code="0" />
    <exit code="128" />
  </upgrade>
  <upgrade cmd='"%SOFTWARE%\Thunderbird\Thunderbird Setup 2.0.0.24.exe" -ms' />

  <remove cmd='taskkill /F /IM thunderbird.exe'>
    <exit code="0" />
    <exit code="128" />
  </remove>
  <remove cmd='"%PROGRAMFILES%\Mozilla Thunderbird\uninstall\helper.exe" /S' />
</package>

Making Thunderbird the default mail and news client

If you want to make Mozilla Thunderbird a default mail and news client, add these registry entries:

Note: Make sure to change the path MOZILL~2 to MOZILL~1 if you have installed Thunderbird before Firefox or any other Mozilla product. (check on the command line by typing "cd %programfiles%\MOZILL~2")

REGEDIT4

[HKEY_CLASSES_ROOT\mailto]
@="URL:MailTo Protocol"
"URL Protocol"=""
[HKEY_CLASSES_ROOT\mailto\DefaultIcon]
@="@ShortProgFiles\\MOZILL~2\\THUNDE~1.EXE,0"
[HKEY_CLASSES_ROOT\mailto\shell\open\command]
@="@ShortProgFiles\\MOZILL~2\\THUNDE~1.EXE -compose %1"
[HKEY_CLASSES_ROOT\news]
@="URL:News Protocol"
"URL Protocol"=""
[HKEY_CLASSES_ROOT\news\DefaultIcon]
@="@ShortProgFiles\\MOZILL~2\\THUNDE~1.EXE,0"
[HKEY_CLASSES_ROOT\news\shell\open\command]
@="@ShortProgFiles\\MOZILL~2\\THUNDE~1.EXE -mail %1"
[HKEY_CLASSES_ROOT\nntp]
@="URL:NNTP Protocol"
"URL Protocol"=""
[HKEY_CLASSES_ROOT\nntp\DefaultIcon]
@="@ShortProgFiles\\MOZILL~2\\THUNDE~1.EXE,0"
[HKEY_CLASSES_ROOT\nntp\shell\open\command]
@="@ShortProgFiles\\MOZILL~2\\THUNDE~1.EXE -mail %1"
[HKEY_CLASSES_ROOT\snews]
@="URL:Snews Protocol"
"URL Protocol"=""
[HKEY_CLASSES_ROOT\snews\DefaultIcon]
@="@ShortProgFiles\\MOZILL~2\\THUNDE~1.EXE,0"
[HKEY_CLASSES_ROOT\snews\shell\open\command]
@="@ShortProgFiles\\MOZILL~2\\THUNDE~1.EXE -mail %1"
[HKEY_CURRENT_USER\Software\Clients\Mail]
@="Mozilla Thunderbird"
[HKEY_LOCAL_MACHINE\SOFTWARE\Clients\Mail]
@="Mozilla Thunderbird"
[HKEY_LOCAL_MACHINE\SOFTWARE\Clients\News]
@="Mozilla Thunderbird"

To register it with WPKG, save it as thunderbird.reg, and add these entries to your Thunderbird WPKG item:

  <install cmd='regedit /s %SOFTWARE%\Thunderbird\thunderbird.reg' />
  
  <upgrade cmd='regedit /s %SOFTWARE%\Thunderbird\thunderbird.reg' />

Alternatively, you can use this jscript file to use full path names:

var WshShell = WScript.CreateObject("WScript.Shell");
var key;
var value;

key = "HKEY_CLASSES_ROOT\\mailto\\";
value = "URL:MailTo Protocol";
WshShell.RegWrite(key, value, "REG_SZ");

key = "HKEY_CLASSES_ROOT\\mailto\\URL Protocol";
value = "";
WshShell.RegWrite(key, value, "REG_SZ");

key = "HKEY_CLASSES_ROOT\\mailto\\defaultIcon\\";
value = WshShell.ExpandEnvironmentStrings("%ProgramFiles%") + "\\Mozilla Thunderbird\Thunderbird.exe,0";
WshShell.RegWrite(key, value, "REG_SZ");

key = "HKEY_CLASSES_ROOT\\mailto\\shell\\open\\command\\";
value = WshShell.ExpandEnvironmentStrings("%ProgramFiles%") + "\\Mozilla Thunderbird\\Thunderbird.exe -compose %1";
WshShell.RegWrite(key, value, "REG_SZ");


key = "HKEY_CLASSES_ROOT\\news\\";
value = "URL:News Protocol";
WshShell.RegWrite(key, value, "REG_SZ");

key = "HKEY_CLASSES_ROOT\\news\\URL Protocol";
value = "";
WshShell.RegWrite(key, value, "REG_SZ");

key = "HKEY_CLASSES_ROOT\\news\\defaultIcon\\";
value = WshShell.ExpandEnvironmentStrings("%ProgramFiles%") + "\\Mozilla Thunderbird\Thunderbird.exe,0";
WshShell.RegWrite(key, value, "REG_SZ");

key = "HKEY_CLASSES_ROOT\\news\\shell\\open\\command\\";
value = WshShell.ExpandEnvironmentStrings("%ProgramFiles%") + "\\Mozilla Thunderbird\\Thunderbird.exe -mail %1";
WshShell.RegWrite(key, value, "REG_SZ");


key = "HKEY_CLASSES_ROOT\\nntp\\";
value = "URL:NNTP Protocol";
WshShell.RegWrite(key, value, "REG_SZ");

key = "HKEY_CLASSES_ROOT\\nntp\\URL Protocol";
value = "";
WshShell.RegWrite(key, value, "REG_SZ");

key = "HKEY_CLASSES_ROOT\\nntp\\defaultIcon\\";
value = WshShell.ExpandEnvironmentStrings("%ProgramFiles%") + "\\Mozilla Thunderbird\Thunderbird.exe,0";
WshShell.RegWrite(key, value, "REG_SZ");

key = "HKEY_CLASSES_ROOT\\nntp\\shell\\open\\command\\";
value = WshShell.ExpandEnvironmentStrings("%ProgramFiles%") + "\\Mozilla Thunderbird\\Thunderbird.exe -mail %1";
WshShell.RegWrite(key, value, "REG_SZ");


key = "HKEY_CLASSES_ROOT\\snews\\";
value = "URL:Snews Protocol";
WshShell.RegWrite(key, value, "REG_SZ");

key = "HKEY_CLASSES_ROOT\\snews\\URL Protocol";
value = "";
WshShell.RegWrite(key, value, "REG_SZ");

key = "HKEY_CLASSES_ROOT\\snews\\defaultIcon\\";
value = WshShell.ExpandEnvironmentStrings("%ProgramFiles%") + "\\Mozilla Thunderbird\Thunderbird.exe,0";
WshShell.RegWrite(key, value, "REG_SZ");

key = "HKEY_CLASSES_ROOT\\snews\\shell\\open\\command\\";
value = WshShell.ExpandEnvironmentStrings("%ProgramFiles%") + "\\Mozilla Thunderbird\\Thunderbird.exe -mail %1";
WshShell.RegWrite(key, value, "REG_SZ");


key = "HKEY_CURRENT_USER\\Software\\Clients\\Mail\\";
value = "Mozilla Thunderbird";
WshShell.RegWrite(key, value, "REG_SZ");

key = "HKEY_LOCAL_MACHINE\\SOFTWARE\\Clients\\Mail\\";
value = "Mozilla Thunderbird";
WshShell.RegWrite(key, value, "REG_SZ");

key = "HKEY_LOCAL_MACHINE\\SOFTWARE\\Clients\\News\\";
value = "Mozilla Thunderbird";
WshShell.RegWrite(key, value, "REG_SZ");


Then add this to your WPKG installer:

  <install cmd='cscript %SOFTWARE%\Thunderbird\setdefault.js' />
  <upgrade cmd='cscript %SOFTWARE%\Thunderbird\setdefault.js' />


Silent installation of Thunderbird extensions

To silently install Thunderbird extensions, do the following:

  • Download the extension
  • The .xpi file is a zipped up set of files. Extract the files using any zip unarchiving program
  • Open the file install.rdf that you just extracted
  • In the section labeled 'Description about="urn:mozilla:install-manifest"', and within that the item labeled 'em:id', copy the long ID number, including the curly brackets, for example '{847b3a00-7ab1-11d4-8f02-006008948af5}'
  • Create a directory using this ID number, including the curly brackets, for example '{847b3a00-7ab1-11d4-8f02-006008948af5}' and put all the extension's files in there
    • (Alternatively you can find the ID number by installing the extension into Thunderbird then looking for it in %PROGRAMFILES%\Mozilla Thunderbird\extensions\, but this is potentially more complicated because you have to look through the install.rdf file of each installed extension to find which extension each relates to)
  • Copy your extension directory to your server
  • The installer then needs to simply copy this directory to %PROGRAMFILES%\Mozilla Thunderbird\extensions. The WPKG installer will look like this:
<package
     id="thunderbird-quicktext"
     name="Quicktext extension"
     revision="1"
     reboot="false"
     priority="0">
 
    <check type="file" condition="exists" path="%PROGRAMFILES%\Mozilla Thunderbird\extensions\{8845E3B3-E8FB-40E2-95E9-EC40294818C4}\install.rdf" />
 
    <install cmd='cmd /C xcopy /Q /I /E /Y "%SOFTWARE%\thunderbird\extensions\quicktext\{8845E3B3-E8FB-40E2-95E9-EC40294818C4}" "%PROGRAMFILES%\Mozilla Thunderbird\extensions\{8845E3B3-E8FB-40E2-95E9-EC40294818C4}"' />
 
    <upgrade cmd='cmd /C xcopy /Q /I /E /Y "%SOFTWARE%\thunderbird\extensions\quicktext\{8845E3B3-E8FB-40E2-95E9-EC40294818C4}" "%PROGRAMFILES%\Mozilla Thunderbird\extensions\{8845E3B3-E8FB-40E2-95E9-EC40294818C4}"' />
 
    <remove cmd='cmd /C rmdir /S /Q "%PROGRAMFILES%\Mozilla Thunderbird\extensions\{8845E3B3-E8FB-40E2-95E9-EC40294818C4}"' />
</package>

When Thunderbird is next started, the new extension is detected automatically - you can verify this in Thunderbird using Tools -> Extensions.

Silent installation of dictionaries (spell-checking)

Thunderbird 1.5

Mozilla Thunderbird keeps its (MySpell) dictionaries in %PROGRAMFILES%\Mozilla Thunderbird\components\myspell\.

By default, it only has an English dictionary (for licensing reasons).

Installing a new dictionary is simple - just copy the dictionary files for a given language to that folder.

Installing a German dictionary

  • Download a German dictionary from http://www.thunderbird-mail.de/hilfe/dokumentation1.5/allg_rechtschreibung.php
  • The file is a .xpi file (a renamed .zip file). Uncompress it using any unzipping program. Inside you'll find .aff and .dic files - these are the core dictionary files. (There is also a .txt file (some info), and a .js file (the installer, used if you install the dictionary using Thunderbird))
  • Copy the core dictionary files into %PROGRAMFILES%\Mozilla Thunderbird\components\myspell\.
  • The WPKG installer to install this dictionary into Thunderbird should look like this:
<package
     id="thunderbird-woerterbuch"
     name="Woerterbuch fuer Thunderbird"
     revision="1"
     reboot="false"
     priority="0">
 
     <check type="file" condition="exists" path="%PROGRAMFILES%\Mozilla Thunderbird\components\myspell\Deutsch - neue Rechtschreibung.aff" />
     <check type="file" condition="exists" path="%PROGRAMFILES%\Mozilla Thunderbird\components\myspell\Deutsch - neue Rechtschreibung.dic" />
     <check type="file" condition="exists" path="%PROGRAMFILES%\Mozilla Thunderbird\components\myspell\Deutsch - neue Rechtschreibung.txt" />
 
     <install cmd='cmd /C xcopy /Q /I /E /Y "%SOFTWARE%\thunderbird\extensions\woerterbuch\*" "%PROGRAMFILES%\Mozilla Thunderbird\components\myspell\"' />
 
     <upgrade cmd='cmd /C xcopy /Q /I /E /Y "%SOFTWARE%\thunderbird\extensions\woerterbuch\*" "%PROGRAMFILES%\Mozilla Thunderbird\components\myspell\"' />
 
     <remove cmd='cmd /C del "%PROGRAMFILES%\Mozilla Thunderbird\components\myspell\Deutsch - neue Rechtschreibung.*"' />
</package>

Thunderbird 2.0

Thunderbird 2.0 has its dictionaries in %PROGRAMFILES%\Mozilla Thunderbird\dictionaries

<package id="thunderbird-spellcheck-dictionary-en-gb" name="Thunderbird spellchecker dictionary English (GB)" revision="4" reboot="false" priority="3">
<depends package-id="thunderbird"/>
<check type="file" condition="exists" path="%PROGRAMFILES%\Mozilla Thunderbird\dictionaries\en-GB.dic"/>
<install cmd="cmd /c "IF NOT EXIST "%PROGRAMFILES%\Mozilla Thunderbird\dictionaries" mkdir "%PROGRAMFILES%\Mozilla Thunderbird\dictionaries"""/>
<install cmd="cmd /c "copy "%SOFTWARE%\thunderbird-dictionaries\*.*" "%PROGRAMFILES%\Mozilla Thunderbird\dictionaries\"""/>
<upgrade cmd="cmd /c "IF NOT EXIST "%PROGRAMFILES%\Mozilla Thunderbird\dictionaries" mkdir "%PROGRAMFILES%\Mozilla Thunderbird\dictionaries"""/>
<upgrade cmd="cmd /c "copy "%SOFTWARE%\thunderbird-dictionaries\*.*" "%PROGRAMFILES%\Mozilla Thunderbird\dictionaries\"""/>
</package>

Alternatively, download the Thunderbird dictionary (download the right one, i.e. the German dictionary from the official webpage won't work) and install it like this:

thunderbird.exe -install-global-extension "x:\software\deutsches_w_ouml_rterbuch-1.0.1-fx+zm+tb.xpi"

Thunderbird Configuration

Types Of Prefs

userpref("pref",<value>); - per-user preferences

pref("pref",<value>); - system-wide preferences that can be over-ridden by users

lockpref("pref",<value>); - system-wide preferences that cannot be over-ridden by users


Methods Of Applying Prefs

Per-person

Use a prefs file in the user's profile directory. You shouldn't edit prefs.js, as that can be overwritten by Thunderbird, instead create and use user.js as that will never be altered by Thunderbird itself. Use the syntax userpref("pref",<value>); here.

System-wide

File in %PROGRAMFILES%\Mozilla thunderbird\defaults\pref\ directory

Thunderbird processes the config files in this directory in reverse alphabetical order. Don't add your prefs to Thunderbird's own pref files as these will be lost on an upgrade of Thunderbird, instead create a file called, for example, all-thunderbird-custom.js, saved in %PROGRAMFILES%\Mozilla thunderbird\defaults\pref\. These preferences can be over-ridden by users. An example file is:

// Options -> Advanced -> Update -> Automatically check for updates to : Installed Extensions and Themes
pref("extensions.update.enabled", false);


Autoconfig

See: http://mit.edu/~thunderbird/www/maintainers/autoconfig.html

Create a customized text file named thunderbird.cfg and put it in the thunderbird executable folder:

'%programfiles%\mozilla thunderbird\thunderbird.cfg'

Edit %programfiles%\mozilla thunderbird\greprefs\all.js addding the following values:

pref("general.config.obscure_value", 0);
pref("general.config.filename", "thunderbird.cfg");

The file can optionally be byteshifted an optional security feature, using general.config.obscure_value.

You can add functionality to the prefs by including javascript within the file.

Example thunderbird.cfg with automatically assigned values from ldap.

//put everything in a try/catch
try {
 
// 1) env variables
if(getenv("USER") != "") {
   // *NIX settings
   var env_user    = getenv("USER");
   var env_home    = getenv("HOME");
 } else {
   // Windows settings
   var env_user    = getenv("USERNAME");
   var env_home    = getenv("HOMEPATH");
 }
  var env_mozdebug= getenv("MOZILLA_DEBUG");
 
 
// 2) set default general preferences

//Account
defaultPref("mail.identity.id1.draft_folder", "imap://" + env_user + "@imap.url/Drafts");
defaultPref("mail.identity.id1.fcc_folder", "imap://" + env_user + "@imap.url/Sent");

//Junk
defaultPref("mail.server.server2.spamActionTargetAccount", "imap://" + env_user + "@imap.url");
defaultPref("mail.server.server2.spamActionTargetFolder", "mailbox://" + env_user + "@imap.url/Junk");

//SMTP
defaultPref("mail.identity.id1.stationery_folder", "imap://" + env_user + "@imap.url/Templates");

 
//SMTP general
lockPref("mail.smtpserver.smtp1.hostname", "smtp.url");
lockPref("mail.smtpserver.smtp1.port", 25);

 
//General
defaultPref("network.proxy.autoconfig_url", "http://proxy.url/proxy.pac");
defaultPref("network.proxy.type", 2);

 
/* 3) define here (because if set after "4)" below it doesn't work !) processLDAPValues which is eventually called by getLDAPAttributes() just below,
 check getLDAPAttributes() code from $MOZILLA_HOME/defaults/autoconfig/prefcalls.js to see the inside call to "user defined" processLDAPValues
*/
function processLDAPValues (values) {
 if(values) {
      // set the global var with the values returned from the LDAP query
      ldap_values = values;
    var uid = getLDAPValue ( values ,"uid" );
    var cn = getLDAPValue ( values ,"cn" );
    var mail = getLDAPValue ( values ,"mail" );
    var URL =  getLDAPValue ( values ,"labeledURI" );
 
// Those ldap variables are only available is this processLDAPValues context !
// so we set the preferences that need them here .
defaultPref("mail.identity.id1.useremail", mail);
defaultPref("mail.server.server2.name", mail );
defaultPref("mail.identity.id1.fullName", cn );
//Debug with popup error messages doesn't work anymore :-( !!
var env_mozdebug= getenv("MOZILLA_DEBUG");
if (env_mozdebug) {displayError("NO ERROR , just a debug, cn =" + cn + " and mail = " + mail ); }
    }
  }
// 4) Call Ldap servers to get Ldap Attributes (mail & cn) , this will finally call processLDAPValues , "3)" just above.
  getLDAPAttributes("ldap.url","ou=people,o=Comapny","uid=" + env_user,"uid,cn,mail,labeledURI");
 
// Close the try, and call the catch()
} catch(e) {
  displayError("lockedPref", e);
}


Prefs

Disable Auto Update

// Options -> Advanced -> Update -> Automatically check for updates to : Installed Extensions and Themes
pref("extensions.update.enabled", false);

// Options -> Advanced -> Update -> Automatically check for updates to : Thunderbird
pref("app.update.enabled", false);

// Options -> Advanced -> Update -> Automatically check for updates to : Search Engines
pref("browser.search.update", false);

See the whole "HowTO prevent Autoupdate on Firefox / Thunderbird" thread: http://lists.wpkg.org/pipermail/wpkg-users/2007-February/001207.html

See bug [2].


Disable Migration Assistant and What's New page

To prevent the Migration Assistant and the What's New page from showing after upgrades, use:

pref("mail.ui.show.migration.on.upgrade", false);
pref("app.update.showInstalledUI", false);
pref("browser.startup.homepage_override.mstone", "ignore");
pref("mailnews.start_page_override.mstone", "ignore");


Disable 'Auto-sync' and 'Work Offline'

Tame Thunderbird 3.0.5 or 3.1.0 so that it doesn't automatically sync IMAP mail to a person's workstation in an organisation because they have roaming user profiles on Windows that would result in C: partitions filling up. There is the old 'work offline' and the new 'auto-sync'. We want neither. Thunderbird's IMAP sync feature gives minimal improvement for a lot of pain.

References:


  • Don't 'keep messages for this account on this computer' (a 'work offline' setting)

GUI: 'Synchronisation & Storage -> Message Synchronising -> [] keep messages for this account on this computer'

Various prefs relevant to this: mail.server.default.offline_download (on by default, unless specifically turned off by the use of mail.server.serverX.offline_download)

Don't confuse this with 'auto-sync, this just allows them to be downloaded when go offline or close Thunderbird. Auto-sync bypasses this setting like one big version equivalent to this.

Controls whether or not newly created folders get flagged for downloading offline [TB 3.0.0 - 3.0.4]; additionally in TB 3.0.5+, setting to "false" prior to first run of TB 3 will prevent the IMAP folders from being set to offline download (which they would otherwise have been by default)

You need to turn this off _before_ the migration from Thunderbird 2 to 3.0.5+ else auto-sync will be enabled upon migration. In 3.0.0 - 3.0.4 auto-sync would be enabled anyway.

pref("mail.server.default.offline_download", false);


  • Don't 'Synchronize all messages locally regardless of age' (an 'auto-sync' setting)

GUI: 'Synchronisation & Storage -> Disk Space -> Synchronize all messages locally regardless of age - off'

Various prefs relevant to this: mail.server.default.autosync_offline_stores - false

mail.server.serverX.autosync_offline_stores - false

? Also there should be no mail.server.serverX.autosync_offline_stores=true ?

If the above setting is made, folder property of offline-use=on/off becomes irrelevant to auto-sync because auto-sync is disabled, and the offline-use=on/off is used for download at "Work Offline" only.

This ignores whether the folder is configured as an offline folder or not.

See http://kb.mozillazine.org/Offline_folders#AutoSync

pref("mail.server.default.autosync_offline_stores", false);


  • 'Synchronise the most recent [1] [Days]' (a 'work offline' setting)

GUI: 'Synchronisation & Storage -> Disk Space -> (*) Synchronise the most recent [1] [Days]'

pref("mail.server.default.autosync_max_age_days", 1);


  • 'Don't download messages larger than 50KB' (a 'work offline' setting)

GUI: Synchronisation & Storage -> Disk Space -> [*] Don't download messages larger than 50KB

Various prefs relevant to this:

mail.server.default.limit_offline_message_size - true (defaults to 50KB)

mail.server.serverX.limit_offline_message_size - true (defaults to 50KB)

mail.server.default.max_size - XXX

mail.server.serverX.max_size - XXX

pref("mail.server.default.limit_offline_message_size", true);


  • Disable the Migration Assistant

Prevents users being asked if they want to enable auto-sync. Available in Thunderbird 3.1 and onwards. We could lock this pref using lockpref, which is an option that should be considered, but that would prevent the option from _ever_ being used and there might be an occasional sane situation in which to use it, for example roaming users with laptops.

pref("mail.ui.show.migration.on.upgrade", false);