Changes

Jump to: navigation, search

Thunderbird

3,268 bytes added, 03:44, 8 November 2007
Removing access to Outlook Express
[[category:Silent Installers]]
 
== Using thunderbird 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");
 
''Note: Byteshifting does not seem to be required with versions 1.5.* or 2.0.*''
 
You can add functionality to the prefs by including javascript within the file.
 
Example thunderbird.cfg with automatically assigned values from ldap.
 
<pre>//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);
}</pre>
Anonymous user

Navigation menu