How to use Autoconfig?

798 views
Skip to first unread message

Benjamin Lang

unread,
Oct 8, 2010, 9:46:04 AM10/8/10
to tb-ent...@mozilla.org
Hello,

I'm trying to get the autoconfig work for TB 3.1.4. so that I can
deactivate
indexing and autosync by default for all users.

I've read many different docs about deploying and autoconfig TB, bot
none of
the solutions worked. The following Strings I've tried so far:

C:\Programm Files\Thunderbird\tbirdadm.cfg
//
lockPref("mail.server.default.offline_download", false);
lockPref("mail.server.default.autosync_offline_stores", false);

C:\Program Files\Thunderbird\greprefs\all.js
//
pref("general.config.obscure_value", 0);
pref(“general.config.filename”, “tbirdadm.cfg”);

I also tried to load the settings from different files (in every doc
it's described a bit different
and the official MDN site says nothing about files to edit:
https://developer.mozilla.org/en/Thunderbird/Deploying_Thunderbird_in_the_Enterprise/Thunderbird_Preferences_Relevant_to_Enterprises)

I hope someone can help me. Thanks in advance!

Kind regards,
Benjamin Lang

--
Benjamin Lang
Campus IT Customer Services

Zentrum für Datenverarbeitung
Universität Tübingen
Wächterstr. 76
D-72074 Tübingen

Telefon: +49 7071 29-70391
Fax : +49 7071 29-5912
Email :benjam...@uni-tuebingen.de

_______________________________________________
tb-enterprise mailing list
tb-ent...@mozilla.org
https://mail.mozilla.org/listinfo/tb-enterprise

Dean Brundage

unread,
Oct 8, 2010, 11:00:16 AM10/8/10
to tb-ent...@mozilla.org
On 10/8/10 8:46 AM, Benjamin Lang wrote:
 Hello,

I'm trying to get the autoconfig work for TB 3.1.4. so that I can deactivate
indexing and autosync by default for all users.

I've read many different docs about deploying and autoconfig TB, bot none of
the solutions worked. The following Strings I've tried so far:

C:\Programm Files\Thunderbird\tbirdadm.cfg
//
lockPref("mail.server.default.offline_download", false);
lockPref("mail.server.default.autosync_offline_stores", false);

C:\Program Files\Thunderbird\greprefs\all.js
//
pref("general.config.obscure_value", 0);
pref(“general.config.filename”, “tbirdadm.cfg”);

I also tried to load the settings from different files (in every doc it's described a bit different
and the official MDN site says nothing about files to edit:
https://developer.mozilla.org/en/Thunderbird/Deploying_Thunderbird_in_the_Enterprise/Thunderbird_Preferences_Relevant_to_Enterprises)

I hope someone can help me. Thanks in advance!

Kind regards,
Benjamin Lang



tbirdadm.cfg is where you tell TB which file to use for autoconfig.  Use something like this line:

lockPref("autoadmin.global_config_url", "file:///path/to/thunderbird,v3.1.4/autoconfig.js");

Move the lockPref directives to autoconfig.js.  You may need to put the full path to tbirdadm.cfg in all.js.  Check out my intro article and Setting Preferences article.

HTH,
--Dean Brundage
--
Unscrambler of eggs
About Me

  • I investigate things to complete my knowledge.
  • My complete knowledge makes my thoughts sincere.
  • My thoughts being sincere, my heart is pure. -- Confucius

Benjamin Lang

unread,
Oct 11, 2010, 3:47:13 AM10/11/10
to tb-ent...@mozilla.org
Hello Dean,

I've tried your solution but without success.

Am 08.10.2010 17:00, schrieb Dean Brundage:
tbirdadm.cfg is where you tell TB which file to use for autoconfig.  Use something like this line:

lockPref("autoadmin.global_config_url", "file:///path/to/thunderbird,v3.1.4/autoconfig.js");

This line I've used in tbirdadm.cfg:
lockPref("autoadmin.global_config_url", "file:///C:/Programme/Mozilla Thunderbird/autoconfig.js");

Do I have to use this "UNIX like" path with slashes or Windows paths with backslashes?

Move the lockPref directives to autoconfig.js.  You may need to put the full path to tbirdadm.cfg in all.js.  Check out my intro article and Setting Preferences article.

The lockPref directive is in autoconfig.js and in "all.js" I appended the following lines:
pref("general.config.obscure_value", 0);  // for MCD .cfg files
pref(“general.config.filename”, “C:\Programme\Mozilla Thunderbird\tbirdadm.cfg”);

Is it possible to see any errors if TB can't read a configfile, e.g logfiles or something?

Best regards,

Dean Brundage

unread,
Oct 11, 2010, 10:26:30 AM10/11/10
to tb-ent...@mozilla.org
On 10/11/10 2:47 AM, Benjamin Lang wrote:
Hello Dean,

I've tried your solution but without success.

Am 08.10.2010 17:00, schrieb Dean Brundage:
tbirdadm.cfg is where you tell TB which file to use for autoconfig.  Use something like this line:

lockPref("autoadmin.global_config_url", "file:///path/to/thunderbird,v3.1.4/autoconfig.js");

This line I've used in tbirdadm.cfg:
lockPref("autoadmin.global_config_url", "file:///C:/Programme/Mozilla Thunderbird/autoconfig.js");

Do I have to use this "UNIX like" path with slashes or Windows paths with backslashes?

You should use a path that makes sense for your operating system.



Move the lockPref directives to autoconfig.js.  You may need to put the full path to tbirdadm.cfg in all.js.  Check out my intro article and Setting Preferences article.

The lockPref directive is in autoconfig.js and in "all.js" I appended the following lines:
pref("general.config.obscure_value", 0);  // for MCD .cfg files
pref(“general.config.filename”, “C:\Programme\Mozilla Thunderbird\tbirdadm.cfg”);

Is it possible to see any errors if TB can't read a configfile, e.g logfiles or something?

Logging is nearly non-existent.  The best I've come up with is to put the entire autoconfig.js file in a try/catch block and use displayError to show what happened.

try {

    // herp derp

} catch(e) {
    var message;

    if (e.lineNumber)
      message = "Line " + (e.lineNumber + 1) + ": " + e;

    else
      message = e;

    displayError("autoconfig", message);
}

Benjamin Lang

unread,
Oct 12, 2010, 4:14:27 AM10/12/10
to tb-ent...@mozilla.org
Am 11.10.2010 16:26, schrieb Dean Brundage:
try {

    // herp derp

} catch(e) {
    var message;

    if (e.lineNumber)
      message = "Line " + (e.lineNumber + 1) + ": " + e;

    else
      message = e;

    displayError("autoconfig", message);
}

I've tried this solution, but it didn't work for me. I also tried to get one single alert
to be sure that the file is loaded, but no popup appears...

//
try {
    lockPref("mail.server.default.offline_download", false);
    lockPref("mail.server.default.autosync_offline_stores", false);
    alert("Configtest");
} catch(e) {
    var message;
    if (e.lineNumber)
      message = "Line " + (e.lineNumber + 1) + ": " + e;
    else
      message = e;
    displayError("autoconfig", message);
}
I also figured out witch kind of path I have to use. The file directive always uses
an uri notification (http://confluence.atlassian.com/display/JIRA/Linking+to+local+file+under+Firefox).
So I've used

lockPref("autoadmin.global_config_url", "file:///C:/Programme/Mozilla Thunderbird/autoconfig.js");
Thats's about the site of it!

Best regards,
Benjamin Lang

Reply all
Reply to author
Forward
0 new messages