Possibilité de préférences par défaut ou forcées pour TB

sessionscripts
Daniel Berteaud 13 years ago
parent 1889b48e35
commit 6c05df23ed
  1. 1
      root/etc/e-smith/db/configuration/defaults/mozilla-mcd/TBEnforce
  2. 4
      root/etc/e-smith/templates/usr/share/mozilla-mcd/thunderbird.conf.php/10All
  3. 68
      root/usr/share/mozilla-mcd/thunderbird.php

@ -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

@ -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");
<?php echo PREF;?>("mail.account.account1.server", "server1");
<?php echo PREF;?>("mail.accountmanager.localfoldersserver", "server1");
<?php echo PREF;?>("mail.server.server1.directory-rel", "[ProfD]Mail/Local Folders");
<?php echo PREF;?>("mail.server.server1.hostname", "Local Folders");
<?php echo PREF;?>("mail.server.server1.name", "Dossiers locaux");
<?php echo PREF;?>("mail.server.server1.type", "none");
<?php echo PREF;?>("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", <?php echo SMTP_PORT; ?>);
lockPref("mail.smtpserver.smtp1.hostname", "<?php echo SMTP_SERVER; ?>");
lockPref("mail.smtpserver.smtp1.username", "<?php echo $uid; ?>");
<?php echo PREF;?>("mail.smtp.defaultserver", "smtp1");
<?php echo PREF;?>("mail.smtpservers", "smtp1");
<?php echo PREF;?>("mail.smtpserver.smtp1.try_ssl", 3);
<?php echo PREF;?>("mail.smtpserver.smtp1.port", <?php echo SMTP_PORT; ?>);
<?php echo PREF;?>("mail.smtpserver.smtp1.hostname", "<?php echo SMTP_SERVER; ?>");
<?php echo PREF;?>("mail.smtpserver.smtp1.username", "<?php echo $uid; ?>");
// Compte par défaut
lockPref("mail.accountmanager.defaultaccount", "account2");
<?php echo PREF;?>("mail.accountmanager.defaultaccount", "account2");
<?php
@ -56,23 +56,23 @@ $accountlist = 'account1';
$identities = ''
?>
// Compte personnel
lockPref("mail.account.account2.server", "server<?php echo $server?>");
lockPref("mail.server.server2.hostname", "<?php echo IMAP_SERVER; ?>");
lockPref("mail.server.server2.name", "<?php echo $user[0]['mail'][0]; ?>");
lockPref("mail.server.server2.port", <?php echo IMAP_PORT; ?>);
lockPref("mail.server.server2.socketType", 3);
lockPref("mail.server.server2.type", "imap");
lockPref("mail.server.server2.userName", "<?php echo $uid; ?>");
<?php echo PREF;?>("mail.account.account2.server", "server<?php echo $server?>");
<?php echo PREF;?>("mail.server.server2.hostname", "<?php echo IMAP_SERVER; ?>");
<?php echo PREF;?>("mail.server.server2.name", "<?php echo $user[0]['mail'][0]; ?>");
<?php echo PREF;?>("mail.server.server2.port", <?php echo IMAP_PORT; ?>);
<?php echo PREF;?>("mail.server.server2.socketType", 3);
<?php echo PREF;?>("mail.server.server2.type", "imap");
<?php echo PREF;?>("mail.server.server2.userName", "<?php echo $uid; ?>");
<?php
for ($i=0; $i < count($user[0]['mail'])-1; $i++){
?>
lockPref("mail.identity.id<?php echo $id; ?>.fullName", "<?php echo $user[0]['cn'][0]; ?>");
lockPref("mail.identity.id<?php echo $id; ?>.organization", "<?php echo $user[0]['o'][0]; ?>");
lockPref("mail.identity.id<?php echo $id; ?>.smtpServer", "smtp1");
lockPref("mail.identity.id<?php echo $id; ?>.useremail", "<?php echo $user[0]['mail'][$i]; ?>");
lockPref("mail.identity.id<?php echo $id; ?>.valid", true);
<?php echo PREF;?>("mail.identity.id<?php echo $id; ?>.fullName", "<?php echo $user[0]['cn'][0]; ?>");
<?php echo PREF;?>("mail.identity.id<?php echo $id; ?>.organization", "<?php echo $user[0]['o'][0]; ?>");
<?php echo PREF;?>("mail.identity.id<?php echo $id; ?>.smtpServer", "smtp1");
<?php echo PREF;?>("mail.identity.id<?php echo $id; ?>.useremail", "<?php echo $user[0]['mail'][$i]; ?>");
<?php echo PREF;?>("mail.identity.id<?php echo $id; ?>.valid", true);
defaultPref("mail.identity.id<?php echo $id; ?>.fcc_folder", "imap://<?php echo $uid; ?>@<?php echo IMAP_SERVER; ?>/Sent");
defaultPref("mail.identity.id<?php echo $id; ?>.draft_folder", "imap://<?php echo $uid; ?>@<?php echo IMAP_SERVER; ?>/Drafts");
defaultPref("mail.identity.id<?php echo $id; ?>.stationery_folder", "imap://<?php echo $uid; ?>@<?php echo IMAP_SERVER; ?>/Templates");
@ -85,20 +85,20 @@ $account++;
$id++;
}
?>
lockPref("mail.account.account2.identities", "<?php echo $identities;?>");
lockPref("mail.accountmanager.accounts", "account1,account2");
<?php echo PREF;?>("mail.account.account2.identities", "<?php echo $identities;?>");
<?php echo PREF;?>("mail.accountmanager.accounts", "account1,account2");
// Mise a jour
lockPref("app.update.enabled", false);
lockPref("app.update.auto", false);
<?php echo PREF;?>("app.update.enabled", false);
<?php echo PREF;?>("app.update.auto", false);
// Extension
lockPref("extensions.installDistroAddons", true);
lockPref("extensions.enabledScopes", 13);
lockPref("extensions.autoDisableScopes", 2);
<?php echo PREF;?>("extensions.installDistroAddons", true);
<?php echo PREF;?>("extensions.enabledScopes", 13);
<?php echo PREF;?>("extensions.autoDisableScopes", 2);
// Spam
lockPref("mail.adaptivefilters.junk_threshold", 500);
<?php echo PREF;?>("mail.adaptivefilters.junk_threshold", 500);
// Checks
defaultPref("mail.check_all_imap_folders_for_new", true);

Loading…
Cancel
Save