Hello,
I have successfully tested the automatic account deployment with MCD, but I am facing a problem.
If I launch Thunderbird without a network connection, the automat… (funda kabanzi)
Hello,
I have successfully tested the automatic account deployment with MCD, but I am facing a problem.
If I launch Thunderbird without a network connection, the automatically generated account disappears and does not come back even if the network is activated again and Thunderbird restarted.
Looking closer at the following parameter in pref.js :
user_pref("mail.accountmanager.accounts", "account1,account2");
are replaced by :
user_pref("mail.accountmanager.accounts", "account2");
I use in my deployment file "defaultPref" for the parameters. I don't want to use "pref" or "lockPref" because I would like to keep the possibility to add additional accounts by hand later.
I don't see how to prevent Thunderbird from changing this setting only outside the network...
Here is my cfg file for information:
try {
var userInfo = new Object(); // This will hold LDAP results
userInfo.envUser = getenv("USERNAME"); // USERNAME
userInfo.envHome = getenv("HOME"); // User home directory
var ldapHost = "XXXX.XXXXX";
var ldapBase = "ou=XXX,dc=XXX,dc=XXX";
if( userInfo.envUser )
{ var ldapFilter = "sAMAccountName=" + userInfo.envUser; }
else
{ throw("Couldn't get UID from the environment"); }
// LDAP attributes to retrieve from the server
var ldapAttrs = new Array( "displayName", "mail", "sAMAccountName", "streetAddress", "telephoneNumber", "department" );
// Define how to process LDAP results before we make the call
function processLDAPValues(queryResults)
{ if( queryResults )
{ // Build the userInfo object for later use
for( var attr in ldapAttrs )
//{ userInfo[ ldapAttrs[attr] ] = utf8_encode(getLDAPValue( queryResults, ldapAttrs[attr] )); } //Results from AD did not come as utf-8 so they have to get converted before use!
{ userInfo[ ldapAttrs[attr] ] = getLDAPValue( queryResults, ldapAttrs[attr] ); } //Results from AD
} else
{ throw( "Pas de resultat LDAP" ); }
}
// Call upon LDAP for the values in ldapAttrs array,
// Uses the previous processLDAPValues()
getLDAPAttributes( ldapHost, ldapBase, ldapFilter, ldapAttrs.join(",") );
// Connexion annuaire LDAP
defaultPref("ldap_2.servers.Company.auth.saslmech", "GSSAPI");
defaultPref("ldap_2.servers.Company.description", "Company");
defaultPref("ldap_2.servers.Company.maxHits", 600);
defaultPref("ldap_2.servers.Company.uri", "ldaps://XX.XXX.XXX/OU=Company,DC=XXXXXXX,DC=XXXXXX??sub?(objectclass=person)");
//
defaultPref("mail.account.account1.identities", "id2022");
defaultPref("mail.account.account1.server", "server2022");
defaultPref("mail.account.lastKey", 1);
defaultPref("mail.accountmanager.accounts", "account1");
defaultPref("mail.accountmanager.defaultaccount", "account1");
defaultPref("mail.accountmanager.localfoldersserver", "server2");
defaultPref("mail.identity.id2022.fullName", userInfo.displayName);
defaultPref("mail.identity.id2022.directoryServer", "ldap_2.servers.Company");
defaultPref("mail.identity.id2022.htmlSigFormat", true);
defaultPref("mail.identity.id2022.htmlSigText","
| \n\n\n\n\n "+userInfo.displayName+" \nfonction • Service • Direction \n------------------------------------------------- \nCompany \nVille \nCS xxxx • XXXXXXX Company CEDEX <a>\n"+userInfo.mail+" </a>\n------------------------------------------------- \nTél : "+userInfo.telephoneNumber+" \n\n\n\n
<a href=\"http://www.Company.fr\"style=\"text-decoration:none;color:#b31016;\">www.Company.fr</a> |
Pensez à l’environnement. N’imprimez ce courriel que si vous en avez vraiment besoin.");
defaultPref("mail.identity.id2022.overrideGlobal_Pref", true);
defaultPref("mail.identity.id2022.reply_on_top", 1);
defaultPref("mail.identity.id2022.sig_bottom", false);
defaultPref("mail.identity.id2022.sig_on_fwd", true);
defaultPref("mail.identity.id2022.smtpServer", "smtp2022");
defaultPref("mail.identity.id2022.useremail", userInfo.mail);
defaultPref("mail.identity.id2022.valid", true);
defaultPref("mail.server.server2022.authMethod", 5);
defaultPref("mail.server.server2022.directory-rel", "[ProfD]ImapMail/mail.Company.fr");
defaultPref("mail.server.server2022.hostname", "mail.Company.fr");
defaultPref("mail.server.server2022.login_at_startup", true);
defaultPref("mail.server.server2022.name", userInfo.displayName);
defaultPref("mail.server.server2022.realuserName", userInfo.sAMAccountName);
defaultPref("mail.server.server2022.port", 993);
defaultPref("mail.server.server2022.socketType", 3);
defaultPref("mail.server.server2022.type", "imap");
defaultPref("mail.server.server2022.use_idle", false);
defaultPref("mail.smtp.defaultserver", "smtp2022");
defaultPref("mail.smtpserver.smtp2022.authMethod", 5);
defaultPref("mail.smtpserver.smtp2022.description", "GSSAPI");
defaultPref("mail.smtpserver.smtp2022.hostname", "smtp2.Company.fr");
defaultPref("mail.smtpserver.smtp2022.port", 465);
defaultPref("mail.smtpserver.smtp2022.try_ssl", 3);
defaultPref("mail.smtpservers", "smtp2022");
// Par défaut désactivation des alertes visuelles et sonores
defaultPref("mail.biff.play_sound", false);
defaultPref("mail.biff.show_alert", false);
defaultPref("mail.biff.show_tray_icon", false);
defaultPref("mail.biff.show_badge", false);
defaultPref("sanity-test.device-id", "0x9a49");
} catch(e) {
displayError("global_settings.js", e);
}