![](media/image1.png){width="2.532638888888889in"
height="0.9097222222222222in"}

**[Thunderbird 1.5.x -- Berkeley Lab Customizations - Rev
1.0]{.smallcaps}**

[1. Installer Changes 2](#installer-changes)

[A. Customize install message 2](#customize-install-message)

[B. Remove QFA and add Berkeley extension
2](#remove-qfa-and-add-berkeley-extension)

[C. Disable most dialog boxes. 2](#disable-most-dialog-boxes.)

[D. Install Berkeley extension 2](#install-berkeley-extension)

[2. Berkeley Lab Email Profile 3](#berkeley-lab-email-profile)

[A. Create Berkeley Lab Email Profile
3](#create-berkeley-lab-email-profile)

[a. Server Info 3](#server-info)

[b. Identify Defaults 3](#identify-defaults)

[B. Default to Berkeley Lab Email Profile
4](#default-to-berkeley-lab-email-profile)

[3. Preference changes made to localstore.rdf
4](#preference-changes-made-to-localstore.rdf)

[A. Remove 'junk' column 4](#remove-junk-column)

[B. Add 'size' column 4](#add-size-column)

[C. Remove 'junk' from toolbar 4](#remove-junk-from-toolbar)

[D. Add 'file' to toolbar 4](#add-file-to-toolbar)

[4. Berkeley.xpi extension 5](#berkeley.xpi-extension)

[A. Overview of files 5](#overview-of-files)

[B. Key functionality 6](#key-functionality)

[Use smtp.lbl.gov on port 25/tcp 8](#use-smtp.lbl.gov-on-port-25tcp)

[Spellcheck before sending 9](#spellcheck-before-sending)

[Send mail in html and plain text 9](#send-mail-in-html-and-plain-text)

[Do not collect email addresses 9](#do-not-collect-email-addresses)

[Disable Junk Email Controls 9](#disable-junk-email-controls)

[No mail startup page 9](#no-mail-startup-page)

[Show remote images in email 9](#show-remote-images-in-email)

[Autocomplete using Global LDAP 9](#autocomplete-using-global-ldap)

[Setup Global LDAP 9](#setup-global-ldap)

[Show expanded columns in the folder pane
9](#show-expanded-columns-in-the-folder-pane)

[5. Testing 12](#testing)

[6. Known Issues 12](#known-issues)

[7. Process notes 12](#process-notes)

[8. Information sources 13](#information-sources)

[9. Appendix A 14](#appendix-a)

# Installer Changes

> This section outlines changes made to the Thunderbird installer that
> affect the install process. Unless otherwise noted changes are made to
> config.ini

## Customize install message 

> Modify *install.ini* as follows:
>
> Welcome_Message0=You are about to install Berkeley Lab Customized %s.
>
> Component_Berkeley=LBNL Customization Extension
>
> Component_Berkeley_Long=for LBNL default settings

## Remove QFA and add Berkeley extension

> Modify config.ini under \[Setup Type0\]
>
> ;C6=Component QFA
>
> C6=Component Berkeley

## Disable most dialog boxes. 

> \[Dialog Setup Type\]
>
> Show Dialog=FALSE
>
> \[Dialog Select Components\]
>
> Show Dialog=FALSE
>
> \[Dialog Select Install Path\]
>
> Show Dialog= FALSE
>
> \[Dialog Windows Integration\]
>
> Show Dialog=FALSE

\[Dialog Start Install\]

> Show Dialog=FALSE

\[Dialog Downloading\]

> Show Dialog=FALSE

## Install Berkeley extension

> Installs the custom extension named berkeley.xpi, which sets
> preferences.
>
> \[Component Berkeley\]
>
> Description Short={Component_Berkeley}
>
> Description Long={Component_Berkeley_Long}
>
> Archive=berkeley.xpi
>
> Install Size=1
>
> Install Size System=1
>
> Install Size Archive=1
>
> Attributes=SELECTED

# Berkeley Lab Email Profile

> A new profile is created that defaults to the settings for the
> Berkeley Lab central mail servers. Users wishing to setup other mail
> accounts, such as for home ISP or other institutions, should not use
> this mail profile.

## Create Berkeley Lab Email Profile

> A new profile type of "**BERKELEY LAB EMAIL ACCOUNT**" was defined by
> adding the file mail.xpi:\\bin\\defaults\\isp\\mailaccount.rdf

### Server Info

1.  Use imap4.lbl.gov

2.  Set to use SSL on 993

3.  Show all folders, not just subscribed

4.  Clean up ("Expunge") inbox on exit

### Identify Defaults

5.  Reply to mail messages above

> \<?xml version=\"1.0\"?\>
>
> \<RDF:RDF
>
> xmlns:NC=\"http://home.netscape.com/NC-rdf#\"
>
> xmlns:RDF=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\"\>
>
> \<RDF:Description about=\"NC:ispinfo\"\>
>
> \<NC:providers\>
>
> \<NC:nsIMsgAccount about=\"domain:lbl.gov\"\>
>
> \<!\-- server info \--\>
>
> \<NC:incomingServer\>
>
> \<NC:nsIMsgIncomingServer\>
>
> \<NC:prettyName\>LBNL\</NC:prettyName\>
>
> \<NC:hostName\>imap4.lbl.gov\</NC:hostName\>
>
> \<NC:type\>imap\</NC:type\>
>
> \<NC:port\>993\</NC:port\>
>
> \<NC:isSecure\>true\</NC:isSecure\>
>
> \<NC:rememberPassword\>false\</NC:rememberPassword\>
>
> \<NC:ServerType-imap\>
>
> \<NC:nsIImapIncomingServer\>
>
> \<NC:usingSubscription\>0\</NC:usingSubscription\>
>
> \<NC:cleanupInboxOnExit\>1\</NC:cleanupInboxOnExit\>
>
> \</NC:nsIImapIncomingServer\>
>
> \</NC:ServerType-imap\>
>
> \</NC:nsIMsgIncomingServer\>
>
> \</NC:incomingServer\>
>
> \<!\-- identity defaults \--\>
>
> \<NC:identity\>
>
> \<NC:nsIMsgIdentity\>
>
> \<NC:composeHtml\>true\</NC:composeHtml\>
>
> \<NC:replyOnTop\>1\</NC:replyOnTop\>
>
> \<NC:bccSelf\>false\</NC:bccSelf\>
>
> \</NC:nsIMsgIdentity\>
>
> \</NC:identity\>
>
> \<NC:wizardSkipPanels\>true\</NC:wizardSkipPanels\>
>
> \<NC:wizardShortName\>lbl\</NC:wizardShortName\>
>
> \<NC:wizardLongName\>\*Berkeley Lab Email
> Account\*\</NC:wizardLongName\>
>
> \<NC:wizardShow\>true\</NC:wizardShow\>
>
> \<NC:wizardPromote\>true\</NC:wizardPromote\>
>
> \<NC:emailProviderName\>lbl.gov\</NC:emailProviderName\>
>
> \<NC:sampleEmail\>username@lbl.gov\</NC:sampleEmail\>
>
> \<NC:sampleUserName\>username\</NC:sampleUserName\>
>
> \<NC:emailIDDescription\>user name\</NC:emailIDDescription\>
>
> \<NC:emailIDFieldTitle\>User name:\</NC:emailIDFieldTitle\>
>
> \<NC:showServerDetailsOnWizardSummary\>false\</NC:showServerDetailsOnWizardSummary\>
>
> \</NC:nsIMsgAccount\>
>
> \</NC:providers\>
>
> \</RDF:Description\>
>
> \</RDF:RDF\>

## Default to Berkeley Lab Email Profile 

> Modify
> *mail.xpi:\\bin\\chrome\\messenger.jar:content\\messenger\\accountwizard.xul*
>
> Remove "**selected=\"true\"**" from under id=\"**mailaccount**\". Move
> the ISP options above the mail account options so that Berkeley Lab
> Email Account becomes the first option.

\<radiogroup id=\"acctyperadio\" \>

\<vbox datasources=\"rdf:ispdefaults\"

> containment=<http://home.netscape.com/NC-rdf#providers>
>
> id=\"ispBox\"
>
> ref=\"NC:ispinfo\"\>
>
> \<template\>
>
> \<rule nc:wizardShow=\"true\"\>
>
> \<radio uri=\"\...\"
>
> value=\"rdf:http://home.netscape.com/NC-rdf#wizardShortName\"
>
> label=\"rdf:http://home.netscape.com/NC-rdf#wizardLongName\"/\>
>
> \</rule\>
>
> \</template\>

\</vbox\>

> \<radio id=\"mailaccount\" value=\"mailaccount\"
>
> label=\"&accountTypeMail.label;\"
> accesskey=\"&accountTypeMail.accesskey;\"/\>
>
> \<radio id=\"newsaccount\" value=\"newsaccount\"
>
> label=\"&accountTypeNews.label;\"
> accesskey=\"&accountTypeNews.accesskey;\"/\>

# Preference changes made to localstore.rdf 

> Modify *mail.xpi:\\bin\\defaults\\profile\\localstore.rdf*, by just
> replacing it with same file from a profile with the settings made.

## Remove 'junk' column

## Add 'size' column 

## Remove 'junk' from toolbar 

## Add 'file' to toolbar

# Berkeley.xpi extension

> When berkeley.xpi has been installed, the settings in berkeley.js file
> will *override the settings* in the files that are under the
> Mail.xpi:\\bin\\defaults\\pref directory thus becoming the default
> values. Since the update process only deals with the preferences under
> the Mail.xpi:\\bin\\defaults\\pref directory, the LBNL settings will
> not be changed.
>
> In addition, the extension creates a new menu items under tools called
> *Restore LBNL Settings* which can be used to reset the preferences at
> any time. When the main window of Thunderbird is called,
> overlay-tb.xul will be merged into the window, which creates the red
> *Restore LBNL Settings* under the *Tools* menu item. When *Restore
> LBNL Settings* is clicked, the *Restore LBNL Settings* window will be
> opened and onConfigLoad() function in config.js will be called.

## Overview of files

  -------------------------------- -------------------------------------------------
  **File**                         **Overview**

  chrome.manifest                  Tells Thunderbird what to do with the files under
                                   the chrome directory

  install.rdf                      The description file for the extension

  overlay-tb.xul                   The highest level script file, which adds the
                                   "Restore LBNL settings" message as a menu item in
                                   the "Tools"popup menu and displays it

  overlay.js                       Lower level JavaScript code, is used to define
                                   the application\'s behavior, which opens the
                                   "Restore LBNL settings" window

  overlay.dtd                      A translation for text string codes, which
                                   defines a list of conditions that overlay-tb.xul
                                   file must follow

  overlay.css                      The display controls for the elements, such as
                                   the font style, size, and color of the "Restore
                                   LBNL settings" message

  lbl.xul                          The highest level script file, which displays the
                                   "Restore LBNL Settings process!" message and the
                                   "Close" button in the "Restore LBNL settings"
                                   window

  lbl.dtd                          A translation for text string codes, which
                                   defines a list of conditions that lbl.xul file
                                   must follow

  config.js                        Lower level JavaScript code, which sets the LBL
                                   settings, is invoked when the "Restore LBNL
                                   settings" window on load

  lblsettings@extensions.lbl.gov   A pointer to the extension files

  install.js                       XPI installer script, which installs berkeley.xpi

  berkeley.js                      configure Berkeley Lab Email settings as default
  -------------------------------- -------------------------------------------------

##  

## Key functionality

> Below key functionality is described for each file. The file name is
> given first, followed by key lines with descriptions of the purpose of
> the line.
>
> **File: chrome.manifest**
>
> 1 content lblsettings jar:chrome/lblsettings.jar!/content/
>
> 2 overlay chrome://messenger/content/messenger.xul
> chrome://lblsettings/content/overlay-tb.xul
>
> 3 style chrome://global/content/customizeToolbar.xul
> chrome://lblsettings/content/overlay.css

1.  Registers a content provider: it maps contents of
    chrome://lblsettings/content/ to the
    jar:chrome/lblsettings.jar!/content/ folder.

2.  Registers an overlay for chrome://messenger/content/messenger.xul
    location, allowing to add to Thunderbird main window UI from the
    overlay-tb.xul file.

3.  Applies your overlay.css style file to
    chrome://global/content/customizeToolbar.xul file.

> **File: overlay-tb.xul**
>
> 1 \<?xml version=\"1.0\"?\>
>
> 2 \<?xml-stylesheet href=\"chrome://lblsettings/content/overlay.css\"
> type=\"text/css\"?\>
>
> 3 \<!DOCTYPE overlay SYSTEM
> \"chrome://lblsettings/content/overlay.dtd\"\>
>
> 4 \<overlay id=\"lblsettings-overlay\"
>
> xmlns=\"http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul\"\>
>
> 5 \<script src=\"overlay.js\"/\>
>
> 6 \<menupopup id=\"taskPopup\"\>
>
> 7 \<menuitem id=\"lblsettings-lbl\" label=\"&lblsettings;\"
>
> oncommand=\"LBLSettings.onMenuItemCommand(event);\"/\>
>
> 8 \</menupopup\>
>
> 9 \</overlay\>

1.  The XML declaration, specifying the version of XML being used.

2.  Used to apply a stylesheet to the document.

3.  Used to include the red color "Restore LBNL settings" string in the
    overlay.

4.  Define the root element of the overlay. It must be a XUL \<overlay\>
    element.

5.  Attach a JavaScript file to the file.

6.  Add a menu item to the Tools menu in Thunderbird main window.

> **File: overlay.js**
>
> var LBLSettings = {
>
> onLoad: function() {
>
> // initialization code
>
> this.initialized = true;
>
> },
>
> onMenuItemCommand: function() {
>
> window.open(\"chrome://lblsettings/content/lbl.xul\", \"\",
> \"chrome\");
>
> }
>
> };
>
> window.addEventListener(\"load\", function(e) { LBLSettings.onLoad(e);
> }, false);
>
> This JavaScript defines an object variable, which has two functions --
> onLoad() and onMenuItemCommand().
>
> **File: overlay.dtd**
>
> \<!ENTITY lblsettings \"LBL Settings\"\>
>
> DTD files are used to make XUL/XBL/XHTML and other XML files in
> Mozilla chrome localizable. Basically, instead of hard-coding the
> strings in the XUL file, **XML entities** are used, which expand to
> the values declared in the DTD file referenced at the top of the XUL
> file. For our extension, there is only one entity in overlay-tb.xul
> file, so it is optional.
>
> **File: overlay.css**
>
> menuitem#lblsettings-lbl {
>
> color: red !important;
>
> }
>
> This is the stylesheet for adding style (e.g. fonts, colors, spacing)
> to the document.
>
> **File: lbl.dtd**
>
> \<!ENTITY title.label \"LBL Settings\"\>
>
> \<!ENTITY separate.label \"LBL Settings process!\"\>
>
> \<!ENTITY close.label \"Close\"\>

This is the DTD file for the "Restore LBNL settings" window.

> **File: lbl.xul**
>
> \<?xml version=\"1.0\"?\>
>
> \<?xml-stylesheet href=\"chrome://global/skin/global.css\"
> type=\"text/css\"?\>
>
> \<!DOCTYPE window SYSTEM \"chrome://lblsettings/content/lbl.dtd\"\>
>
> \<window
> xmlns=\"http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul\"
>
> title=\"&title.label;\"
>
> onload=\"onConfigLoad();\"\>
>
> \<script src=\"chrome://lblsettings/content/config.js\"/\>
>
> \<hbox align=\"center\"\>
>
> \<description flex=\"1\"\>&separate.label;\</description\>
>
> \<button label=\"&close.label;\" oncommand=\"close();\"/\>
>
> \</hbox\>
>
> \</window\>
>
> This is lbl.xul, which is used to describe the "Restore LBNL Settings"
> window. When the "Restore LBNL settings" window is on load, the
> onConfigLoad() function in the JavaScript config.js is called.
>
> **File: config.js**
>
> There is an onConfigLoad() function in this file. It calls the
> preferences-service to get the preferences object variable prefs, then
> uses the following to set the user value to the preferences names:
>
> setCharPref("preferences.name")=="string";
>
> setIntPref("preferences.name")==integerValue;
>
> setBoolPref("preferences.name")==booleanValue;
>
> The settings in this file are similar to those in Berkeley.js
>
> **File: install.js**
>
> This is the Berkeley.xpi installer script. It is similar as the other
> installer in the XPIs. The key steps in this file are as follows:
>
> //Initializethe installation
>
> var err = initInstall(\"LNBL\", \"LNBL\", \"v1.0\");
>
> logComment(\"initInstall: \" + err);
>
> //Adding Files and Directories to the install
>
> var extensionsdir = getFolder(getFolder(\"Program\"), \"extensions\");
>
> var cckextensiondir = getFolder(extensionsdir,
> \"lblsettings@extensions.lbl.gov\");
>
> addDirectory(\"\", \"v1.0\", \"chrome\", cckextensiondir, \"chrome\",
> true);
>
> addDirectory(\"\", \"v1.0\", \"defaults\", cckextensiondir,
> \"defaults\", true);
>
> addFile(\"\", \"v1.0\", \"chrome.manifest\", cckextensiondir, \"\",
> true);
>
> addFile(\"\", \"v1.0\", \"install.rdf\", cckextensiondir, \"\", true);
>
> //Execting the Installation if it has been initialized and loaded
> successfully
>
> err = getLastError();
>
> if (err==SUCCESS)
>
> performInstall();
>
> else
>
> cancelInstall(err);
>
> **File: berkeley.js**
>
> This is the default settings of LBNL customizations for Thunderbird.
> This causes the default Thunderbird settings to be overridden with the
> following.
>
> pref(\"mail.server.server1.type\", \"imap\");
>
> pref(\"mail.server.server1.hostname\", \"imap4.lbl.gov\");
>
> pref(\"mail.server.server1.isSecure\", true);
>
> pref(\"mail.server.server1.socketType\", 3);
>
> pref(\"mail.server.server1.port\", 993);
>
> pref(\"mail.server.server1.useSecAuth\", false);
>
> pref(\"mail.server.server1.using_subscription\", false);
>
> pref(\"mail.server.server1.cleanup_inbox_on_exit\", true);
>
> pref(\"mail.identity.id1.auto_quote\", true);
>
> pref(\"mail.identity.id1.reply_on_top\", 1);
>
> pref(\"mail.smtp.defaultserver\", \"smtp1\");

### Use smtp.lbl.gov on port 25/tcp

> pref(\"mail.smtpserver.smtp1.description\", \"LBNL TCP/25\");
>
> pref(\"mail.smtpserver.smtp1.hostname\", \"smtp.lbl.gov\");
>
> pref(\"mail.smtpserver.smtp1.port\", 25);
>
> pref(\"mail.smtpserver.smtp1.try_ssl\", 0);
>
> pref(\"mail.smtpservers\", \"smtp1\");
>
> pref(\"mail.startup.enabledMailCheckOnce\", true);
>
> pref(\"mail.smtpserver.smtp1.auth_method\", 0);

### Spellcheck before sending

> pref(\"mail.SpellCheckBeforeSend\", true);

### Send mail in html and plain text

> pref(\"mail.default_html_action\", 3);

### Do not collect email addresses

> pref(\"mail.collect_email_address_outgoing\", false);

### Disable Junk Email Controls

> pref(\"mail.server.server1.spamLevel\", 0);
>
> pref(\"mail.server.server2.spamLevel\", 0);
>
> pref(\"mailnews.ui.junk.firstuse\", false);

### No mail startup page

> pref(\"mailnews.start_page.enabled\", false);

### Show remote images in email

> pref(\"mailnews.message_display.disable_remote_image\", false);

### Autocomplete using Global LDAP

> pref(\"ldap_2.autoComplete.directoryServer\",
> \"ldap_2.servers.LDAP\");
>
> pref(\"ldap_2.autoComplete.useDirectory\", true);
>
> pref(\"mail.identity.id1.overrideGlobal_Pref\", false);
>
> pref(\"mail.identity.id1.directoryServer\", \"ldap_2.servers.LDAP\");

### Setup Global LDAP

> pref(\"ldap_2.prefs_migrated\", true);
>
> pref(\"ldap_2.servers.LDAP.auth.savePassword\", true);
>
> pref(\"ldap_2.servers.LDAP.description\", \"LDAP\");
>
> pref(\"ldap_2.servers.LDAP.filename\", \"abook-1.mab\");
>
> pref(\"ldap_2.servers.LDAP.replication.lastChangeNumber\", 0);
>
> pref(\"ldap_2.servers.LDAP.uri\", \"ldap://ldap.lbl.gov:389/ou=People,
> o=Lawrence Berkeley Laboratory, c=US??sub?(objectclass=\*)\");
>
> pref(\"ldap_2.servers.Netscape71.position\", 0);
>
> pref(\"ldap_2.servers.PersonalAddressbook_1.position\", 0);
>
> pref(\"ldap_2.servers.default.filename\", \"default.mab\");
>
> pref(\"ldap_2.servers.default.replication.lastChangeNumber\", 0);
>
> pref(\"ldap_2.servers.default.uri\",
> \"moz-abldapdirectory://default.mab\");
>
> pref(\"ldap_2.servers.history.filename\", \"history.mab\");
>
> pref(\"ldap_2.servers.history.replication.lastChangeNumber\", 0);
>
> pref(\"ldap_2.servers.pab.filename\", \"abook.mab\");
>
> pref(\"ldap_2.servers.pab.replication.lastChangeNumber\", 0);
>
> pref(\"ldap_2.servers.pab_1.position\", 0);
>
> pref(\"ldap_2.servers.pab_2.position\", 0);
>
> pref(\"ldap_2.servers.personaladdressbook.position\", 0);

### Show expanded columns in the folder pane

> prefs.setBoolPref(\"mail.showFolderPaneColumns\", true);
>
> **File: config.js**
>
> This is the file used to set preferences when "Tools" and then
> "Restore LBNL Settings" is selected. There is an onConfigLoad()
> function in this file. It calls the preferences-service to get the
> preferences object variable prefs, then uses the following to set the
> user value to the preferences names:
>
> setCharPref("preferences.name")=="string";
>
> setIntPref("preferences.name")==integerValue;
>
> setBoolPref("preferences.name")==booleanValue;
>
> function onConfigLoad()
>
> {
>
> var prefs =
> Components.classes\[\"@mozilla.org/preferences-service;1\"\].
>
> getService(Components.interfaces.nsIPrefBranch);
>
> //Berkeley Lab Email Profile
>
> //a. Server Info
>
> //1. use IMAP
>
> prefs.setCharPref(\"mail.server.server1.type\", \"imap\");
>
> prefs.setCharPref(\"mail.server.server1.hostname\",
> \"imap4.lbl.gov\");
>
> prefs.setCharPref(\"mail.server.server1.realhostname\",
> \"imap4.lbl.gov\");
>
> //2. Set to use SSL on 993
>
> prefs.setBoolPref(\"mail.server.server1.isSecure\", true);
>
> prefs.setIntPref(\"mail.server.server1.socketType\", 3);
>
> prefs.setIntPref(\"mail.server.server1.port\", 993);
>
> prefs.setBoolPref(\"mail.server.server1.useSecAuth\", false);
>
> //3. Show all folders, not just subscribed
>
> prefs.setBoolPref(\"mail.server.server1.using_subscription\", false);
>
> //4. Clean up (\"expunge\") inbox on exit
>
> prefs.setBoolPref(\"mail.server.server1.cleanup_inbox_on_exit\",
> true);
>
> // END OF a. Server Info
>
> //b. Identify Defaults
>
> //5. Reply to email messages above
>
> prefs.setBoolPref(\"mail.identity.id1.auto_quote\", true);
>
> prefs.setIntPref(\"mail.identity.id1.reply_on_top\", 1);
>
> //6. Organization information
>
> //END OF b. Identify Defaults
>
> //c. SMTP
>
> //7. use smtp.lbl.gov as the outgoing mail server
>
> prefs.setCharPref(\"mail.smtp.defaultserver\", \"smtp1\");
>
> prefs.setCharPref(\"mail.smtpserver.smtp1.description\", \"LBNL
> TCP/25\");
>
> prefs.setCharPref(\"mail.smtpserver.smtp1.hostname\",
> \"smtp.lbl.gov\");
>
> prefs.setIntPref(\"mail.smtpserver.smtp1.port\", 25);
>
> prefs.setIntPref(\"mail.smtpserver.smtp1.try_ssl\", 0);
>
> prefs.setCharPref(\"mail.smtpservers\", \"smtp1\");
>
> prefs.setBoolPref(\"mail.startup.enabledMailCheckOnce\", true);
>
> //8. No SMTP authentication
>
> prefs.setIntPref(\"mail.smtpserver.smtp1.auth_method\", 0);
>
> //END OF c. SMTP
>
> //Preference change made to prefs.js
>
> //a. Spell check before send
>
> prefs.setBoolPref(\"mail.SpellCheckBeforeSend\", true);
>
> //b. send mail in html and plain text
>
> prefs.setIntPref(\"mail.default_html_action\", 3);
>
> //c. Do not collect email addresses
>
> prefs.setBoolPref(\"mail.collect_email_address_outgoing\", false);
>
> //d. Disable Junk Email Controls
>
> prefs.setIntPref(\"mail.server.server2.spamLevel\", 0);
>
> prefs.setIntPref(\"mail.server.server1.spamLevel\", 0);
>
> prefs.setBoolPref(\"mailnews.ui.junk.firstuse\", false);
>
> //e. No mail startup page
>
> prefs.setBoolPref(\"mailnews.start_page.enabled\", false);
>
> //f. Show remote images in email
>
> prefs.setBoolPref(\"mailnews.message_display.disable_remote_image\",
> false);
>
> //g. Autocomplete using Global LDAP
>
> prefs.setCharPref(\"ldap_2.autoComplete.directoryServer\",
> \"ldap_2.servers.LDAP\");
>
> prefs.setBoolPref(\"ldap_2.autoComplete.useDirectory\", true);
>
> prefs.setBoolPref(\"mail.identity.id1.overrideGlobal_Pref\", false);
>
> prefs.setCharPref(\"mail.identity.id1.directoryServer\",
> \"ldap_2.servers.LDAP\");
>
> //h. Setup Global LDAP
>
> //Migrates LDAP prefs to Thunderbird 1.5. Necessary to enable LDAP
> lookup and auto-completion.
>
> prefs.setBoolPref(\"ldap_2.prefs_migrated\", true);
>
> prefs.setBoolPref(\"ldap_2.servers.LDAP.auth.savePassword\", true);
>
> prefs.setCharPref(\"ldap_2.servers.LDAP.description\", \"LDAP\");
>
> prefs.setCharPref(\"ldap_2.servers.LDAP.filename\", \"abook-1.mab\");
>
> prefs.setIntPref(\"ldap_2.servers.LDAP.replication.lastChangeNumber\",
> 0);
>
> prefs.setCharPref(\"ldap_2.servers.LDAP.uri\",
> \"ldap://ldap.lbl.gov:389/ou=People, o=Lawrence Berkeley Laboratory,
> c=US??sub?(objectclass=\*)\");
>
> prefs.setIntPref(\"ldap_2.servers.Netscape71.position\", 0);
>
> prefs.setIntPref(\"ldap_2.servers.PersonalAddressbook_1.position\",
> 0);
>
> prefs.setCharPref(\"ldap_2.servers.default.filename\",
> \"default.mab\");
>
> prefs.setIntPref(\"ldap_2.servers.default.replication.lastChangeNumber\",
> 0);
>
> prefs.setCharPref(\"ldap_2.servers.default.uri\",
> \"moz-abldapdirectory://default.mab\");
>
> prefs.setCharPref(\"ldap_2.servers.history.filename\",
> \"history.mab\");
>
> prefs.setIntPref(\"ldap_2.servers.history.replication.lastChangeNumber\",
> 0);
>
> prefs.setCharPref(\"ldap_2.servers.pab.filename\", \"abook.mab\");
>
> prefs.setIntPref(\"ldap_2.servers.pab.replication.lastChangeNumber\",
> 0);
>
> prefs.setIntPref(\"ldap_2.servers.pab_1.position\", 0);
>
> prefs.setIntPref(\"ldap_2.servers.pab_2.position\", 0);
>
> prefs.setIntPref(\"ldap_2.servers.personaladdressbook.position\", 0);
>
> //i. Show expanded columns in the folder pane
>
> prefs.setBoolPref(\"mail.showFolderPaneColumns\", true);
>
> }
>
> function onConfigUnload()
>
> { }

# Testing 

**New install test**

+----------------------+-----------------------+--------------+-------+
| **Action**           | **Observations**      | **Notes**    | **P   |
|                      |                       |              | ass/F |
|                      |                       |              | ail** |
+----------------------+-----------------------+--------------+-------+
| Customize 1.5 per    | 7.4MB download to     | All          | Pass  |
| above. Create a      | update                | c            |       |
| Berkeley Lab email   |                       | ustomization |       |
| account and observe  |                       | remains      |       |
| settings are         |                       |              |       |
| correct. Auto-update |                       |              |       |
| to 1.5.x             |                       |              |       |
+----------------------+-----------------------+--------------+-------+
| Customize 1.5.0.2    | Looks like a 510KB    | All          | Pass  |
| per above. Create a  | incremental update    | c            |       |
| Berkeley Lab email   | occurs. Prompts for   | ustomization |       |
| account and observer | restart of TB. Once   | remains      |       |
| settings are         | you restart it notes  |              |       |
| correct. Auto-update | partial update could  | Two prompts  |       |
| to 1.5.x             | not complete, click   | could be     |       |
|                      | next for a complete   | confusing to |       |
|                      | update and you get    | users        |       |
|                      | the 7.4MB update      |              |       |
+----------------------+-----------------------+--------------+-------+

  --------------------------- ------------------- --------- ----------- ----------- ---------------
  **Action**                  **Customization**   **Local   **Address   **Mail      **Pass/Fail**
                                                  Mail**    Book**      filters**   

  Mozilla 1.7.8 to TB 1.5.0.2 All customization   Yes       No          Yes         Pass
  then run extension then     is correct                                            
  update to 1.5.x                                                                   
  --------------------------- ------------------- --------- ----------- ----------- ---------------

**Conclusion:** We have tested the two previous auto update instances.
Our preferences remained in place with both of these instances; giving
us some confidence the next auto update will not break our
customization. In addition the upgrade test represents the typical
upgrade path for existing users of mail. The customization is applied
with the migration and holds through currently known auto update
mechanisms.

# Known Issues

-   *Berkeley Lab Email Account* is not selected by default. If we have
    the installer select it, the *RSS News & Blogs* also gets selected.
    Even though *Berkeley Lab Email Account* would be used, this is
    visually confusing to users. The downside of not having *Berkeley
    Lab Email Account* selected as the default is people may select
    *Email Account* instead of *Berkeley Lab Email Account*. This would
    result in the user having to manually enter all of the items in
    section 2 of this document. *Berkeley Lab Email Account* is the
    first item in the selection list.

# Process notes

> The following documents the high level process for customizing Mozilla
> products

1.  Download the installer from the Mozilla website. Double click the
    installer to begin the install process. Do not continue with the
    install, leave it up and running.

2.  Check your temp directory (you can determine your temp directory by
    typing "set" at the command prompt and noting the location of TEMP).
    Inside of the temp directory you will find a newly created randomly
    named temp folder. Look for the newest time stamped folder to help
    locate it. You'll know you have the right folder if it has several
    .xpi files in it.

3.  Copy the entire contents of this folder to a working folder, then
    exit the running installer, it is no longer needed.

4.  Modify the files in the working folder as recommended in this
    document. The use of WinRAR (<http://www.rarlab.com/>) is
    recommended since it allows individual extraction and replacement of
    files within a directory path of an archive (zip, xpi, and jar). In
    other words, you don't have to extract the entire archive to work on
    it.

5.  Reinsert the modified files into the appropriate archive. The next
    step is to turn the group of files back into a self extracting
    executable install package.

6.  A free utility packsetup2
    (<http://www.wischik.com/lu/programmer/packsetup2.html>) easily
    creates a self extracting executables install package. Simply aim
    packsetup2 at the directory and give it the name of the self
    extracting file to create. A few notes: packsetup2 cannot handle not
    DOS format directory structures or names, packsetup2 needs the full
    path to place the executable.

# Information sources

> The following describes some of the ways the information herein was
> obtained.

1.  <http://mozdoc.burlco.org/> Best single site on the net

2.  The Netscape 7.0 CCK was used to modify a Netscape 7.0 Install. By
    looking at the mods madr by the CCK you can observe what files to
    change in Mozilla.

3.  <http://wp.netscape.com/eng/mozilla/ns62/CCKDocs/mac_linux_cck.htm>
    give info about creating a custom mailaccount.rdf file.

4.  <http://forums.mozillazine.org/viewtopic.php?t=61284>, great sample
    mailaccount.rtf.

5.  [http://72.14.209.104/search?q=cache:7ft86ETRjp0J:forum.mozilla.ru/doku.php%3Fid%3Dthunderbird:tips:autoaccount+%3CNC:cleanupInboxOnExit%3E1%3C/NC:cleanupInboxOnExit%3E&hl=en&gl=us&ct=clnk&cd=1&client=firefox-a](http://72.14.209.104/search?q=cache:7ft86ETRjp0J:forum.mozilla.ru/doku.php%3Fid%3Dthunderbird:tips:autoaccount+<NC:cleanupInboxOnExit>1</NC:cleanupInboxOnExit>&hl=en&gl=us&ct=clnk&cd=1&client=firefox-a)
    the Romanians are smart.

# Appendix A

This section outlines what have become legacy settings due to the
extensions. These settings are documented here for posterity.

**These SMTP settings *in mailaccount.rdf* are no longer needed**

\<NC:smtp\>

> \<NC:nsISmtpServer\>
>
> \<NC:hostname\>smtp.lbl.gov\</NC:hostname\>
>
> \<NC:description\>LBNL SMTP 25/tcp\</NC:description\>
>
> \</NC:nsISmtpServer\>
>
> \</NC:smtp\>
>
> \<NC:smtpRequiresUsername\>false\</NC:smtpRequiresUsername\>
>
> \<NC:smtpCreateNewServer\>true\</NC:smtpCreateNewServer\>
>
> \<NC:smtpUsePreferredServer\>true\</NC:smtpUsePreferredServer\>

**Preference changes made to
*mail.xpi:\\bin\\defaults\\profile\\prefs.js* are no longer needed.**

> Spell check before send user_pref(\"mail.SpellCheckBeforeSend\",
> true);
>
> Send in HTML and plain text user_pref(\"mail.default_html_action\",
> 3);
>
> Don't collect email addres
> user_pref(\"mail.collect_email_address_outgoing\", false);
>
> Disable Junk Email Controls user_pref("mail.server.server2.spamLevel",
> 0);
>
> user_pref(\"mailnews.ui.junk.firstuse\", false)
>
> No mail startup page user_pref(\"mailnews.start_page.enabled\",
> false);
>
> Show remote images in email
> user_pref(\"mailnews.message_display.disable_remote_image\", false);
>
> Autocomplete uses LDAP
> user_pref(\"ldap_2.autoComplete.directoryServer\",
> \"ldap_2.servers.LBNLLDAP\");
>
> user_pref(\"ldap_2.autoComplete.useDirectory\", true);
>
> Setup Global LDAP
>
> user_pref(\"ldap_2.prefs_migrated\", true);
>
> user_pref(\"ldap_2.servers.LBNLLDAP.auth.savePassword\", true);
>
> user_pref(\"ldap_2.servers.LBNLLDAP.description\", \"LBNL LDAP\");
>
> user_pref(\"ldap_2.servers.LBNLLDAP.filename\", \"abook-1.mab\");
>
> user_pref(\"ldap_2.servers.LBNLLDAP.replication.lastChangeNumber\",
> 0);
>
> user_pref(\"ldap_2.servers.LBNLLDAP.uri\",
> \"ldap://ldap.lbl.gov:389/ou=People, o=Lawrence Berkeley Laboratory,
> c=US??sub?(objectclass=\*)\");
>
> user_pref(\"ldap_2.servers.Netscape71.position\", 0);
>
> user_pref(\"ldap_2.servers.PersonalAddressBook_1.position\", 0);
>
> user_pref(\"ldap_2.servers.default.filename\", \"default.mab\");
>
> user_pref(\"ldap_2.servers.default.replication.lastChangeNumber\", 0);
>
> user_pref(\"ldap_2.servers.default.uri\",
> \"moz-abldapdirectory://default.mab\");
>
> user_pref(\"ldap_2.servers.history.filename\", \"history.mab\");
>
> user_pref(\"ldap_2.servers.history.replication.lastChangeNumber\", 0);
>
> user_pref(\"ldap_2.servers.pab.filename\", \"abook.mab\");
>
> user_pref(\"ldap_2.servers.pab.replication.lastChangeNumber\", 0);
>
> user_pref(\"ldap_2.servers.pab_1.position\", 0);
>
> user_pref(\"ldap_2.servers.pab_2.position\", 0);
>
> user_pref(\"ldap_2.servers.personaladdressbook.position\", 0);