My work (a college) recently switched from the now-bankrupt Mulberry to the nice and free Thunderbird (we would have gone with Mail, but there is no PC version to be had). We wanted to make the install as painless as possible on our Help Desk Staff (student workers). This AppleScript will take a copy of a known good configuration and install it on a different machine. This is my first attempt at writing AppleScripts, so be nice :)
For the script to run correctly, you will need to set up Thunderbird exactly the way that you want it to be, including any custom changes made to the prefs.js file (custom LDAP mappings and such), and then quit Thunderbird to save all the prefs.
Next make a copy of your ~/Library/Thunderbird folder and edit the prefs.js file in the copy's profile directory. Remove all instances of your full name and replace with FULL_NAME. Also change all instances of your user ID to USER_ID. After this is completed, you will then need to zip up both the script and your copy of the Thunderbird prefs (this script does not handle permissions issues, but unzipping seems to do the trick fairly well).
Install for your clients is simple. First install Thunderbird but do not open it. Unzip and run the script. Start Thunderbird and click on Get Mail. This script must be run this from the Desktop (as everything is hard coded), and turn on access for assistive devices in the Universal Access System Preferences panel.
The benefit of this code is that is allows you to install Thunderbird for any user with the same base email address (foo@blah.edu), and you will know that you settings are correct, and custom changes will not need to be made. Also, if you see anyone's example scripts living in here, props to them -- thanks for all the online help I found creating this, even if I do not remember where I got it all.
[robg adds: I haven't tested this one.]
Mac OS X Hints
http://hints.macworld.com/article.php?story=20060925121053578