From 6c05df23ed5860342b7b5ae7f0a4fe1814e7f58b Mon Sep 17 00:00:00 2001 From: Daniel Berteaud Date: Wed, 27 Jun 2012 18:24:42 +0200 Subject: [PATCH] =?UTF-8?q?Possibilit=C3=A9=20de=20pr=C3=A9f=C3=A9rences?= =?UTF-8?q?=20par=20d=C3=A9faut=20ou=20forc=C3=A9es=20pour=20TB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../configuration/defaults/mozilla-mcd/TBEnforce | 1 + .../share/mozilla-mcd/thunderbird.conf.php/10All | 4 ++ root/usr/share/mozilla-mcd/thunderbird.php | 68 +++++++++++----------- 3 files changed, 39 insertions(+), 34 deletions(-) create mode 100644 root/etc/e-smith/db/configuration/defaults/mozilla-mcd/TBEnforce diff --git a/root/etc/e-smith/db/configuration/defaults/mozilla-mcd/TBEnforce b/root/etc/e-smith/db/configuration/defaults/mozilla-mcd/TBEnforce new file mode 100644 index 0000000..7a68b11 --- /dev/null +++ b/root/etc/e-smith/db/configuration/defaults/mozilla-mcd/TBEnforce @@ -0,0 +1 @@ +disabled diff --git a/root/etc/e-smith/templates/usr/share/mozilla-mcd/thunderbird.conf.php/10All b/root/etc/e-smith/templates/usr/share/mozilla-mcd/thunderbird.conf.php/10All index 2eb9e53..127106d 100644 --- a/root/etc/e-smith/templates/usr/share/mozilla-mcd/thunderbird.conf.php/10All +++ b/root/etc/e-smith/templates/usr/share/mozilla-mcd/thunderbird.conf.php/10All @@ -4,6 +4,8 @@ use esmith::util; my $ldapbase = esmith::util::ldapBase ($DomainName); +my $pref = ((${'mozilla-mcd'}{'TBEnforce'} || 'disabled') eq 'enabled') ? "lockPref":"defaultPref"; + $OUT .=<<"EOF"; define('DOMAIN', '$DomainName'); @@ -13,6 +15,8 @@ define('IMAP_PORT', '$imaps{'TCPPort'}'); define('SMTP_SERVER', '$SystemName.$DomainName'); define('SMTP_PORT', '$ssmtpd{'TCPPort'}'); define('LDAP_SERVER', 'localhost'); +define('PREF', '$pref'); + EOF diff --git a/root/usr/share/mozilla-mcd/thunderbird.php b/root/usr/share/mozilla-mcd/thunderbird.php index 232a682..8b611f7 100644 --- a/root/usr/share/mozilla-mcd/thunderbird.php +++ b/root/usr/share/mozilla-mcd/thunderbird.php @@ -27,24 +27,24 @@ else { // Compte local -lockPref("mail.account.account1.server", "server1"); -lockPref("mail.accountmanager.localfoldersserver", "server1"); -lockPref("mail.server.server1.directory-rel", "[ProfD]Mail/Local Folders"); -lockPref("mail.server.server1.hostname", "Local Folders"); -lockPref("mail.server.server1.name", "Dossiers locaux"); -lockPref("mail.server.server1.type", "none"); -lockPref("mail.server.server1.userName", "nobody"); +("mail.account.account1.server", "server1"); +("mail.accountmanager.localfoldersserver", "server1"); +("mail.server.server1.directory-rel", "[ProfD]Mail/Local Folders"); +("mail.server.server1.hostname", "Local Folders"); +("mail.server.server1.name", "Dossiers locaux"); +("mail.server.server1.type", "none"); +("mail.server.server1.userName", "nobody"); // SMTP -lockPref("mail.smtp.defaultserver", "smtp1"); -lockPref("mail.smtpservers", "smtp1"); -lockPref("mail.smtpserver.smtp1.try_ssl", 3); -lockPref("mail.smtpserver.smtp1.port", ); -lockPref("mail.smtpserver.smtp1.hostname", ""); -lockPref("mail.smtpserver.smtp1.username", ""); +("mail.smtp.defaultserver", "smtp1"); +("mail.smtpservers", "smtp1"); +("mail.smtpserver.smtp1.try_ssl", 3); +("mail.smtpserver.smtp1.port", ); +("mail.smtpserver.smtp1.hostname", ""); +("mail.smtpserver.smtp1.username", ""); // Compte par défaut -lockPref("mail.accountmanager.defaultaccount", "account2"); +("mail.accountmanager.defaultaccount", "account2"); // Compte personnel -lockPref("mail.account.account2.server", "server"); -lockPref("mail.server.server2.hostname", ""); -lockPref("mail.server.server2.name", ""); -lockPref("mail.server.server2.port", ); -lockPref("mail.server.server2.socketType", 3); -lockPref("mail.server.server2.type", "imap"); -lockPref("mail.server.server2.userName", ""); +("mail.account.account2.server", "server"); +("mail.server.server2.hostname", ""); +("mail.server.server2.name", ""); +("mail.server.server2.port", ); +("mail.server.server2.socketType", 3); +("mail.server.server2.type", "imap"); +("mail.server.server2.userName", ""); -lockPref("mail.identity.id.fullName", ""); -lockPref("mail.identity.id.organization", ""); -lockPref("mail.identity.id.smtpServer", "smtp1"); -lockPref("mail.identity.id.useremail", ""); -lockPref("mail.identity.id.valid", true); +("mail.identity.id.fullName", ""); +("mail.identity.id.organization", ""); +("mail.identity.id.smtpServer", "smtp1"); +("mail.identity.id.useremail", ""); +("mail.identity.id.valid", true); defaultPref("mail.identity.id.fcc_folder", "imap://@/Sent"); defaultPref("mail.identity.id.draft_folder", "imap://@/Drafts"); defaultPref("mail.identity.id.stationery_folder", "imap://@/Templates"); @@ -85,20 +85,20 @@ $account++; $id++; } ?> -lockPref("mail.account.account2.identities", ""); -lockPref("mail.accountmanager.accounts", "account1,account2"); +("mail.account.account2.identities", ""); +("mail.accountmanager.accounts", "account1,account2"); // Mise a jour -lockPref("app.update.enabled", false); -lockPref("app.update.auto", false); +("app.update.enabled", false); +("app.update.auto", false); // Extension -lockPref("extensions.installDistroAddons", true); -lockPref("extensions.enabledScopes", 13); -lockPref("extensions.autoDisableScopes", 2); +("extensions.installDistroAddons", true); +("extensions.enabledScopes", 13); +("extensions.autoDisableScopes", 2); // Spam -lockPref("mail.adaptivefilters.junk_threshold", 500); +("mail.adaptivefilters.junk_threshold", 500); // Checks defaultPref("mail.check_all_imap_folders_for_new", true);