One of the big challenges ISPs face in deploying e-mail software to their customers involves creating mail accounts for users. ISPs have to document and spend a lot of time helping users with ISP specific information such as the mail server name, authentication options, SSL, SMTP server name, etc.
Thunderbird has hooks which makes account creation easy for ISP customers. In most instances, a new user only needs to know the username associated with the ISP account, Thunderbird can automatically fill in the rest of the account details.
How does it work
The idea is fairly straightforward. An ISP can list all of its account setting information in a .rdf or .xml file. This file can be distributed with Thunderbird or it can be installed as an extension by the user. Thunderbird looks for these ISP files at start up, adding a new account type for each one in the New Account Wizard Dialog.
Building the ISP File
The files are simple text files, in utf-8 encoding, so use your favorite modern text editor. A working install of thunderbird is also handy for testing.
There are several example ISP data files you can use as a template:
Adding Acccount Properties
A mail account has several objects associated with it: a mail server, smtp server, and user identity. Each object has its own settings which can be specified in this ISP file.
- Generic server tags in the ISP file can match the attributes in
http://lxr.mozilla.org/seamonkey/source/mailnews/base/public/nsIMsgIncomingServer.idl (they automatically map to any object that's listed as "attribute" in this IDL file)
- Identity tags match the same way for:
- SMTP Server tags match the same way for:
Note: the incoming server type is a string, either "imap", "pop3", or "nntp". Here's an example for defining a POP server.
pop3 server info <NC:incomingServer> <NC:nsIMsgIncomingServer> <NC:prettyName>DION</NC:prettyName> <NC:hostName>pop.h2.dion.ne.jp</NC:hostName> <NC:type>pop3</NC:type> <NC:rememberPassword>true</NC:rememberPassword> </NC:nsIMsgIncomingServer> </NC:incomingServer>
changing NC:type to imap instead of pop3 would cause the account to be created with an IMAP server.
Another generic property in nsIMsgIncomingServer ISPs frequently like to adjust is socketType. Which can have a value of 0 (default socket), 1 (try TLS), 2 (always use TLS), 3 (use SSL).
Any of the generic attributes listed in nsIMsgIncomingServer can be specified here. The same holds true for the identity and SMTP settings.
Now that you have a file which specifies the default values for your ISP settings, how do you get it into the hands of your users?
There are two ways to do this.
If you are distributing a customized version of Thunderbird, simply add the .rdf or .xml to $INSTALLFOLDER/default/isp where $INSTALLFOLDER is the location of thunderbird.exe. Thunderbird automatically looks in this directory location for any .rdf and .xml files.
As an Extension
ISP Account files can be installed in Thunderbird using the Mozilla Extension system. You can even host an extension for your ISP on http://addons.mozilla.org.
We've already created an existing extension you can use as a template: http://www.mozilla.org/projects/thunderbird/specs/ispexample.xpi.
Open the .xpi file using your favorite zip utility. Rename dion.rdf, adjust the account specific information in the newly renamed .rdf file and zip the files into yourisp.xpi. We encourage ou to submit your ISP XPI as an extension on addons.mozilla.org.