Compare commits

..

No commits in common. 'master' and 'sessionscripts' have entirely different histories.

  1. 8
      createlinks
  2. 141
      ipasserelle-gp.spec
  3. 1
      root/etc/e-smith/db/configuration/defaults/mozilla-mcd/NoEnforceGroups
  4. 1
      root/etc/e-smith/db/configuration/defaults/wpkg/OutlookSignatures
  5. 1
      root/etc/e-smith/db/configuration/defaults/wpkg/ThunderbirdSignatures
  6. 8
      root/etc/e-smith/events/actions/wpkg-init
  7. 3
      root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/99MozMcdThunderbird
  8. 2
      root/etc/e-smith/templates/etc/smb.conf/22MapHomeDir
  9. 6
      root/etc/e-smith/templates/home/e-smith/files/shares/tools/files/scripts/wpkg/conf.bat/10All
  10. 4
      root/etc/e-smith/templates/home/e-smith/files/shares/wpkg/files/profiles/variables.xml/10All
  11. 2
      root/etc/e-smith/templates/home/e-smith/files/shares/wpkg/files/profiles/variables.xml/template-begin
  12. 1
      root/etc/e-smith/templates/home/e-smith/files/shares/wpkg/files/profiles/variables.xml/template-end
  13. 34
      root/etc/e-smith/templates/usr/share/mozilla-mcd/conf.php/10All
  14. 23
      root/etc/e-smith/templates/usr/share/mozilla-mcd/thunderbird.conf.php/10All
  15. 16
      root/etc/e-smith/web/functions/logonscript
  16. 72
      root/home/e-smith/files/shares/tools/files/scripts/session/010signature.bat
  17. 3
      root/home/e-smith/files/shares/tools/files/scripts/session/012setOfficeName.bat
  18. 70
      root/home/e-smith/files/shares/tools/files/scripts/session/015mozBackup.bat
  19. 3
      root/home/e-smith/files/shares/tools/files/scripts/wpkg/install.bat
  20. 3
      root/home/e-smith/files/shares/tools/files/scripts/wpkg/run.bat
  21. 2
      root/home/e-smith/files/shares/wpkg/files/hosts.xml
  22. 30
      root/home/e-smith/files/shares/wpkg/files/profiles.xml
  23. 39
      root/sbin/e-smith/generate_netlogon
  24. 2
      root/usr/lib/perl5/site_perl/esmith/FormMagick/Panel/logonscript.pm
  25. 84
      root/usr/share/mozilla-mcd/firefox.php
  26. 194
      root/usr/share/mozilla-mcd/thunderbird.php

@ -10,11 +10,11 @@ templates2events("/home/e-smith/files/shares/tools/files/scripts/session/001conf
templates2events("/home/e-smith/files/shares/tools/files/scripts/wpkg/conf.bat", qw(wpkg-update bootstrap-console-save)); templates2events("/home/e-smith/files/shares/tools/files/scripts/wpkg/conf.bat", qw(wpkg-update bootstrap-console-save));
templates2events("/home/e-smith/files/shares/wpkg/files/config.xml", qw(wpkg-update bootstrap-console-save)); templates2events("/home/e-smith/files/shares/wpkg/files/config.xml", qw(wpkg-update bootstrap-console-save));
templates2events("/home/e-smith/files/shares/wpkg/files/profiles/variables.xml", qw(wpkg-update bootstrap-console-save)); templates2events("/home/e-smith/files/shares/wpkg/files/profiles/variables.xml", qw(wpkg-update bootstrap-console-save));
templates2events("/home/e-smith/files/samba/netlogon/netlogon.bat", qw(workgroup-update bootstrap-console-save)); templates2events("/home/e-smith/files/samba/netlogon/netlogon.bat", qw(workgroup-update bootstrap-consolesave));
templates2events("/usr/share/mozilla-mcd/conf.php", qw(wpkg-update webapps-update bootstrap-console-save)); templates2events("/usr/share/mozilla-mcd/thunderbird.conf.php", qw(wpkg-update webapps-update bootstrap-consolesave));
safe_symlink("/etc/e-smith/templates-default/template-begin-php", "root/etc/e-smith/templates/usr/share/mozilla-mcd/conf.php/template-begin"); safe_symlink("/etc/e-smith/templates-default/template-begin-php", "root/etc/e-smith/templates/usr/share/mozilla-mcd/thunderbird.conf.php/template-begin");
safe_symlink("/etc/e-smith/templates-default/template-end-php", "root/etc/e-smith/templates/usr/share/mozilla-mcd/conf.php/template-end"); safe_symlink("/etc/e-smith/templates-default/template-end-php", "root/etc/e-smith/templates/usr/share/mozilla-mcd/thunderbird.conf.php/template-end");
panel_link('logonscript','manager'); panel_link('logonscript','manager');

@ -1,4 +1,4 @@
%define version 0.2.39 %define version 0.1.2
%define release 1 %define release 1
%define name ipasserelle-gp %define name ipasserelle-gp
@ -18,149 +18,11 @@ BuildRequires: e-smith-devtools
Requires: ipasserelle-base Requires: ipasserelle-base
Requires: smeserver-fusioninventory-agent Requires: smeserver-fusioninventory-agent
Obsoletes: smeserver-loginscript
Provides: smeserver-loginscript
%description %description
Ce paquet permet de gérer un parc de machines sous MS Windows Ce paquet permet de gérer un parc de machines sous MS Windows
Basé sur WPKG et d'autres outils Basé sur WPKG et d'autres outils
%changelog %changelog
* Tue Apr 21 2015 Daniel Berteaud <daniel@firewall-services.com> - 0.2.39-1
- Create a default email_modif.txt if missing (for outlook)
* Thu Apr 2 2015 Daniel Berteaud <daniel@firewall-services.com> - 0.2.38-1
- Add support for Outlook signature deployment
* Tue Mar 24 2015 Daniel Berteaud <daniel@firewall-services.com> - 0.2.37-1
- Add xmind in the sample workstation profile
* Fri Dec 19 2014 Daniel Berteaud <daniel@firewall-services.com> - 0.2.36-1
- Also exclude ImapMail_old from thunderbird profile's backup
* Wed Jul 16 2014 Daniel Berteaud <daniel@firewall-services.com> - 0.2.35-1
- Fix a typo in bootstrap-console-save event name
* Tue Feb 25 2014 Daniel Berteaud <daniel@firewall-services.com> - 0.2.34-1
- Configure Thunderbird to add signature on reply and forward
* Thu Feb 6 2014 Daniel Berteaud <daniel@firewall-services.com> - 0.2.33-1
- Configure Thunderbird to reply on top by default
- Remove some hardcoded defaultPref, use the global type instead
* Fri Jan 10 2014 Daniel Berteaud <daniel@firewall-services.com> - 0.2.32-1
- Add a few packages (disabled) in the workstation profile
* Thu Apr 4 2013 Daniel Berteaud <daniel@firewall-services.com> - 0.2.31-1
- Revert previous change as it prevents XMPP accounts to work properly
* Thu Feb 21 2013 Daniel Berteaud <daniel@firewall-services.com> - 0.2.30-1
- Use UTF-8 for Thunderbird conf
* Wed Feb 20 2013 Daniel Berteaud <daniel@firewall-services.com> - 0.2.29-1
- Add userprofile package in workstation profile
* Wed Dec 19 2012 Daniel Berteaud <daniel@firewall-services.com> - 0.2.28-1
- Add HOSTNAME constant in mcd config
- Don't disable popup blocker
* Tue Nov 20 2012 Daniel Berteaud <daniel@firewall-services.com> - 0.2.27-1
- Exclude ImapMail.old and Mail from Thunderbird profile backups
* Sat Nov 10 2012 Daniel Berteaud <daniel@firewall-services.com> - 0.2.26-1
- Fix missing GOTO in mozBackup script
* Fri Nov 9 2012 Daniel Berteaud <daniel@firewall-services.com> - 0.2.25-1
- Use GOTO :EOF instead of exit in mozBackup
* Thu Oct 18 2012 Daniel Berteaud <daniel@firewall-services.com> - 0.2.24-1
- Let other package add variables
* Thu Sep 27 2012 Daniel Berteaud <daniel@firewall-services.com> - 0.2.23-1
- Fix default imap folders
- Add a session script to backup Thunderbird and Firefox profiles
- Add freemap in workstation profile (commented)
- Add kompozer in graphiste profile
* Mon Sep 24 2012 Daniel Berteaud <daniel@firewall-services.com> - 0.2.22-1
- Don't generate accounts config if we receive a email address which
is not an uid
- Support a whitelist of groups
* Fri Sep 21 2012 Daniel Berteaud <daniel@firewall-services.com> - 0.2.21-1
- Revert lookup with an email address
* Fri Sep 21 2012 Daniel Berteaud <daniel@firewall-services.com> - 0.2.20-1
- Fix uid if a email address is passed
* Thu Sep 20 2012 Daniel Berteaud <daniel@firewall-services.com> - 0.2.19-1
- Fix mail.content_disposition_type pref
* Thu Sep 20 2012 Daniel Berteaud <daniel@firewall-services.com> - 0.2.18-1
- Don't force defaultPref for some settings (use the default, either defaultPref or lockPref)
- Lookup in LDAP using the mail address if the uid doesn't return any result
* Wed Sep 12 2012 Daniel Berteaud <daniel@firewall-services.com> - 0.2.17-1
- Fix home page URL for Firefox
* Wed Sep 12 2012 Daniel Berteaud <daniel@firewall-services.com> - 0.2.16-1
- Include Firefox conf fragments
* Sat Sep 8 2012 Daniel Berteaud <daniel@firewall-services.com> - 0.2.15-1
- Don't enforce Firefox or Thunderbird config for members of
specified groups
- Get the home URL from LDAP if it's set
- Make defaultPref for home URL works
* Fri Sep 7 2012 Daniel Berteaud <daniel@firewall-services.com> - 0.2.14-1
- small improvments in Thunderbird auto config
* Thu Sep 6 2012 Daniel Berteaud <daniel@firewall-services.com> - 0.2.13-1
- Update workstation profile
* Wed Aug 29 2012 Daniel Berteaud <daniel@firewall-services.com> - 0.2.12-1
- Add ZBX_SERVER_IP in the variable profile
* Fri Aug 24 2012 Daniel Berteaud <daniel@firewall-services.com> - 0.2.11-1
- Create wpkg and wpkglogs shares as hidden and non removable
* Thu Aug 23 2012 Daniel Berteaud <daniel@firewall-services.com> - 0.2.10-1
- Add settings in the default profile
* Thu Jul 26 2012 Daniel Berteaud <daniel@firewall-services.com> - 0.2.9-1
- Fix Thunderbird conf generator
* Fri Jul 20 2012 Daniel Berteaud <daniel@firewall-services.com> - 0.2.8-1
- Add basic firefox autoconf support
* Wed Jul 18 2012 Daniel Berteaud <daniel@firewall-services.com> - 0.2.7-1
- Use full path for the mail signature (using javascript and env var)
- Cleanups comments in mozilla-mcd script
* Mon Jul 16 2012 Daniel Berteaud <daniel@firewall-services.com> - 0.2.6-1
- Fix logon drive mapping
* Mon Jul 16 2012 Daniel Berteaud <daniel@firewall-services.com> - 0.2.5-1
- Add sketchup in graphiste profile
- Fix SERVER1 exemple in hosts.xml
* Thu Jul 12 2012 Daniel Berteaud <daniel@firewall-services.com> - 0.2.4-1
- Add a session script to set username in Office
* Mon Jul 9 2012 Daniel Berteaud <daniel@firewall-services.com> - 0.2.3-1
- Add a "server" profile
* Fri Jul 6 2012 Daniel Berteaud <daniel@firewall-services.com> - 0.2.2-1
- Add JCE in workstation profile
* Wed Jul 4 2012 Daniel Berteaud <daniel@firewall-services.com> - 0.2.1-1
- Add ultradefrag in default profile
* Mon Jul 2 2012 Daniel Berteaud <daniel@firewall-services.com> - 0.2.0-1
- Provide a session script framework
- Include a panel to manage custom session script
- Provides scripts to autoconfigure Thunderbird
* Wed Jun 20 2012 Daniel Berteaud <daniel@firewall-services.com> 0.1.2-1 * Wed Jun 20 2012 Daniel Berteaud <daniel@firewall-services.com> 0.1.2-1
- Make standard profiles depends on workstation instead of default - Make standard profiles depends on workstation instead of default
@ -176,7 +38,6 @@ Basé sur WPKG et d'autres outils
%build %build
%{__mkdir_p} root/home/e-smith/files/shares/wpkg/files/profiles/ %{__mkdir_p} root/home/e-smith/files/shares/wpkg/files/profiles/
%{__mkdir_p} root/home/e-smith/files/shares/tools/files/scripts/users
perl createlinks perl createlinks
%install %install

@ -91,9 +91,7 @@ if (!$wpkg){
ReadUsers => 'deploiement', ReadUsers => 'deploiement',
smbAccess => 'non-browseable', smbAccess => 'non-browseable',
httpAccess => 'none', httpAccess => 'none',
RecycleBin => 'disabled', RecycleBin => 'disabled'
Hide => 'yes',
Removable => 'no'
}); });
unless ( system("/sbin/e-smith/signal-event", "share-create", "wpkg") == 0 ){ unless ( system("/sbin/e-smith/signal-event", "share-create", "wpkg") == 0 ){
@ -112,9 +110,7 @@ if (!$wpkglogs){
WriteUsers => 'deploiement', WriteUsers => 'deploiement',
smbAccess => 'non-browseable', smbAccess => 'non-browseable',
httpAccess => 'none', httpAccess => 'none',
RecycleBin => 'disabled', RecycleBin => 'disabled'
Hide => 'yes',
Removable => 'no'
}); });
unless ( system("/sbin/e-smith/signal-event", "share-create", "wpkglogs") == 0 ){ unless ( system("/sbin/e-smith/signal-event", "share-create", "wpkglogs") == 0 ){

@ -7,7 +7,6 @@ if ((${'mozilla-mcd'}{'status'} || 'disabled')eq 'enabled'){
$OUT .=<<"EOF"; $OUT .=<<"EOF";
Alias /thunderbird.cfg /usr/share/mozilla-mcd/thunderbird.php Alias /thunderbird.cfg /usr/share/mozilla-mcd/thunderbird.php
Alias /firefox.cfg /usr/share/mozilla-mcd/firefox.php
<Directory /usr/share/mozilla-mcd/> <Directory /usr/share/mozilla-mcd/>
AddType application/x-httpd-php .php .php3 AddType application/x-httpd-php .php .php3
@ -15,7 +14,7 @@ Alias /firefox.cfg /usr/share/mozilla-mcd/firefox.php
Order deny,allow Order deny,allow
Deny from all Deny from all
Allow from $access Allow from $access
<FilesMatch "conf\.php$"> <FilesMatch "\.conf\.php$">
order deny,allow order deny,allow
Deny from all Deny from all
</FilesMatch> </FilesMatch>

@ -0,0 +1,2 @@
logon drive = { $smb{'HomeDrive'} || 'h:' }

@ -7,9 +7,6 @@ my $wg = $smb{'Workgroup'};
my $name = $SystemName; my $name = $SystemName;
my $url = "https://auth." . $DomainName; my $url = "https://auth." . $DomainName;
my $comp = $ldap{'defaultCompany'}; my $comp = $ldap{'defaultCompany'};
my $mozbackup = (($wpkg{'MozillaBackup'} || 'no') =~ m/^yes|enabled|on|1$/) ? 'yes':'no';
my $olsig = (($wpkg{'OutlookSignatures'} || 'no') =~ m/^yes|enabled|on|1$/) ? 'yes':'no';
my $tbsig = (($wpkg{'ThunderbirdSignatures'} || 'yes') =~ m/^yes|enabled|on|1$/) ? 'yes':'no';
$OUT .=<<"EOF"; $OUT .=<<"EOF";
@ -22,9 +19,6 @@ SET COMPANY=$comp
SET SOFTWARE=\\\\%IPASSERELLE_IP%\\wpkg\\softwares SET SOFTWARE=\\\\%IPASSERELLE_IP%\\wpkg\\softwares
SET SETTINGS=\\\\%IPASSERELLE_IP%\\wpkg\\settings SET SETTINGS=\\\\%IPASSERELLE_IP%\\wpkg\\settings
SET WPKGLOGS=\\\\%IPASSERELLE_IP%\\wpkglogs SET WPKGLOGS=\\\\%IPASSERELLE_IP%\\wpkglogs
SET MOZBACKUP=$mozbackup
SET TBSIG=$tbsig
SET OLSIG=$olsig
EOF EOF

@ -1,12 +1,14 @@
<profile id="variables">
<variable name="IPASSERELLE_DOMAIN" value="{$DomainName}" /> <variable name="IPASSERELLE_DOMAIN" value="{$DomainName}" />
<variable name="IPASSERELLE_NT_DOMAIN" value="{uc($smb{'Workgroup'})}" /> <variable name="IPASSERELLE_NT_DOMAIN" value="{uc($smb{'Workgroup'})}" />
<variable name="IPASSERELLE_NAME" value="{$smb{'ServerName'}}" /> <variable name="IPASSERELLE_NAME" value="{$smb{'ServerName'}}" />
<variable name="IPASSERELLE_IP" value="{$InternalInterface{'IPAddress'}}" /> <variable name="IPASSERELLE_IP" value="{$InternalInterface{'IPAddress'}}" />
<variable name="BACKUP_SERVER_IP" value="{$wpkg{'BackupServer'} || $InternalInterface{'IPAddress'}}" /> <variable name="BACKUP_SERVER_IP" value="{$wpkg{'BackupServer'} || $InternalInterface{'IPAddress'}}" />
<variable name='BACKUP_USER' value="{$wpkg{'BackupUser'} || 'backup'}" /> <variable name='BACKUP_USER' value="{$wpkg{'BackupUser'} || 'backup'}" />
<variable name='ZBX_SERVER_IP' value="{$wpkg{'ZabbixServer'} || $InternalInterface{'IPAddress'}}" />
<variable name="IPASSERELLE_HOME_URL" value="http://auth.%IPASSERELLE_DOMAIN%" /> <variable name="IPASSERELLE_HOME_URL" value="http://auth.%IPASSERELLE_DOMAIN%" />
<variable name="TOOLS" value="\\%IPASSERELLE_IP%\tools" /> <variable name="TOOLS" value="\\%IPASSERELLE_IP%\tools" />
<variable name="WPKGLOGS" value="\\%IPASSERELLE_IP%\wpkglogs" /> <variable name="WPKGLOGS" value="\\%IPASSERELLE_IP%\wpkglogs" />
<variable name="SOFTWARE" value="\\%IPASSERELLE_IP%\wpkg\softwares" /> <variable name="SOFTWARE" value="\\%IPASSERELLE_IP%\wpkg\softwares" />
<variable name="SETTINGS" value="\\%IPASSERELLE_IP%\wpkg\settings" /> <variable name="SETTINGS" value="\\%IPASSERELLE_IP%\wpkg\settings" />
</profile>

@ -13,5 +13,3 @@
# #
# Copyright (C) 1999-2006 Mitel Networks Corporation # Copyright (C) 1999-2006 Mitel Networks Corporation
--> -->
<profile id="variables">

@ -1,34 +0,0 @@
{
use esmith::util;
my $ldapbase = esmith::util::ldapBase ($DomainName);
my $tbpref = ((${'mozilla-mcd'}{'TBEnforce'} || 'disabled') =~ m/^enabled|on|1|yes$/) ? "lockPref":"defaultPref";
my $ffpref = ((${'mozilla-mcd'}{'FFEnforce'} || 'disabled') =~ m/^enabled|on|1|yes$/) ? "lockPref":"defaultPref";
my $url = ${'mozilla-mcd'}{'HomeURL'} || 'https://auth.' . "$DomainName";
my @noenforcegroups = split( /[;,]/, (${'mozilla-mcd'}{'NoEnforceGroups'} || '') );
my @wlgroups = split( /[;,]/, (${'mozilla-mcd'}{'WhiteListGroups'} || '') );
my $noenforcegroups = join (',', @noenforcegroups);
my $wlgroups = join (',', @wlgroups);
$OUT .=<<"EOF";
define('HOSTNAME', '$SystemName');
define('DOMAIN', '$DomainName');
define('USER_BASE', 'ou=Users,$ldapbase');
define('IMAP_SERVER', '$SystemName.$DomainName');
define('IMAP_PORT', '$imaps{'TCPPort'}');
define('SMTP_SERVER', '$SystemName.$DomainName');
define('SMTP_PORT', '$ssmtpd{'TCPPort'}');
define('LDAP_SERVER', 'localhost');
define('TB_PREF', '$tbpref');
define('FF_PREF', '$ffpref');
define('HOME_URL', '$url');
\$NOENFORCEGROUPS = array($noenforcegroups);
\$WHITELISTGROUPS = array($wlgroups);
EOF
}

@ -0,0 +1,23 @@
{
use esmith::util;
my $ldapbase = esmith::util::ldapBase ($DomainName);
my $pref = ((${'mozilla-mcd'}{'TBEnforce'} || 'disabled') =~ m/^enabled|on|1|yes$/) ? "lockPref":"defaultPref";
$OUT .=<<"EOF";
define('DOMAIN', '$DomainName');
define('USER_BASE', 'ou=Users,$ldapbase');
define('IMAP_SERVER', '$SystemName.$DomainName');
define('IMAP_PORT', '$imaps{'TCPPort'}');
define('SMTP_SERVER', '$SystemName.$DomainName');
define('SMTP_PORT', '$ssmtpd{'TCPPort'}');
define('LDAP_SERVER', 'localhost');
define('PREF', '$pref');
EOF
}

@ -42,14 +42,14 @@ __DATA__
<description>FIRSTPAGE_DESC</description> <description>FIRSTPAGE_DESC</description>
<field type="select" <field type="select"
id="homedrive" id="homedrive"
options="'a' => 'A:', 'b' => 'B:', 'c' => 'C:', 'd' => 'D:', options="'a:' => 'A:', 'b:' => 'B:', 'c:' => 'C:', 'd:' => 'D:',
'e' => 'E:', 'f' => 'F:', 'g' => 'G:', 'h' => 'H:', 'e:' => 'E:', 'f:' => 'F:', 'g:' => 'G:', 'h:' => 'H:',
'i' => 'I:', 'j' => 'J:', 'k' => 'K:', 'l' => 'L:', 'i:' => 'I:', 'j:' => 'J:', 'k:' => 'K:', 'l:' => 'L:',
'm' => 'M:', 'n' => 'N:', 'o' => 'O:', 'p' => 'P:', 'm:' => 'M:', 'n:' => 'N:', 'o:' => 'O:', 'p:' => 'P:',
'q' => 'Q:', 'r' => 'R:', 's' => 'S:', 't' => 'T:', 'q:' => 'Q:', 'r:' => 'R:', 's:' => 'S:', 't:' => 'T:',
'u' => 'U:', 'v' => 'V:', 'w' => 'W:', 'x' => 'X:', 'u:' => 'U:', 'v:' => 'V:', 'w:' => 'W:', 'x:' => 'X:',
'y' => 'Y:', 'z' => 'Z:'" 'y:' => 'Y:', 'z:' => 'Z:'"
value="get_prop('smb', 'LogonDrive')"> value="get_prop('smb', 'HomeDrive')">
<label>LABEL_HOME_DRIVE</label> <label>LABEL_HOME_DRIVE</label>
<description>DESC_HOME_DRIVE</description> <description>DESC_HOME_DRIVE</description>
</field> </field>

@ -1,73 +1,3 @@
@echo off if exist "\\%IPASSERELLE_IP%\tools\signatures\%USERNAME%" (
REM gestion des signatures de mail
if not exist "\\%IPASSERELLE_IP%\tools\signatures\%USERNAME%" GOTO :EOF
REM Pour Thunderbird, simple copie, le resrte étant fait par MCD
if "%TBSIG%" EQU "yes" (
if exist "\\%IPASSERELLE_IP%\tools\signatures\%USERNAME%" (
xcopy /E /I /Y \\%IPASSERELLE_IP%\tools\signatures\%USERNAME% "%USERPROFILE%\signature" xcopy /E /I /Y \\%IPASSERELLE_IP%\tools\signatures\%USERNAME% "%USERPROFILE%\signature"
)
)
if "%OLSIG%" EQU "yes" (
REM premier deploiement ?
if not exist "%APPDATA%\Microsoft\Signatures\email.htm" (
SET OV="unknown"
REM Detection version Outlook
REM 2013 = 15.0
reg query "HKLM\Software\Microsoft\Office\15.0\Outlook" >NUL 2>NUL
if %errorlevel% EQU 0 (
SET OV=15.0
GOTO :MODREG
)
REM 2010 = 14.0
reg query "HKLM\Software\Microsoft\Office\14.0\Outlook" >NUL 2>NUL
if %errorlevel% EQU 0 (
SET OV=14.0
GOTO :MODREG
)
REM 2007 = 12.0
reg query "HKLM\Software\Microsoft\Office\12.0\Outlook" >NUL 2>NUL
if %errorlevel% EQU 0 (
SET OV=12.0
GOTO :MODREG
)
REM Version inconnue d'office, on arrete
IF "%OV%" EQU "unknown" GOTO :EOF
echo "Office %OV%"
:MODREG
REM Supprimer First Run pour que Outlook prenne en compte les signatures au prochain lancement
reg delete "HKEY_CURRENT_USER\Software\Microsoft\Office\%OV%\Outlook\Setup" /v "First-Run" /f
REM TODO: selection de la signature via le serveur
SET SIG="email"
if exist "\\%IPASSERELLE_IP%\tools\signatures\%USERNAME%\email_modif.html" (
SET SIG="email_modif"
)
REM Configurer la signature pour les nouveaux mails et les reponses
reg add "HKEY_CURRENT_USER\Software\Microsoft\Office\%OV%\Common\MailSettings" /t REG_EXPAND_SZ /v NewSignature /d "%SIG%" /f
reg add "HKEY_CURRENT_USER\Software\Microsoft\Office\%OV%\Common\MailSettings" /t REG_EXPAND_SZ /v ReplySignature /d "%SIG%" /f
REM Les images des signatures doivent etre inline pour s'afficher
reg add "HKEY_CURRENT_USER\Software\Microsoft\Office\%OV%\Outlook\Options\Mail" /t REG_DWORD /v "Send Pictures With Document" /d 1 /f
)
REM Copie des signatures
xcopy /E /I /Y "\\%IPASSERELLE_IP%\tools\signatures\%USERNAME%\*" "%APPDATA%\Microsoft\Signatures\"
del /Q /F "%APPDATA%\Microsoft\Signatures\email.htm"
rename "%APPDATA%\Microsoft\Signatures\email.html" "email.htm"
echo -- > "%APPDATA%\Microsoft\Signatures\email.rtf"
type "%APPDATA%\Microsoft\Signatures\email.txt" >> "%APPDATA%\Microsoft\Signatures\email.rtf"
copy /Y "%APPDATA%\Microsoft\Signatures\email.rtf" "%APPDATA%\Microsoft\Signatures\email.txt"
if exist "%APPDATA%\Microsoft\Signatures\email_modif.html" (
del /Q /F "%APPDATA%\Microsoft\Signatures\email_modif.htm"
rename "%APPDATA%\Microsoft\Signatures\email_modif.html" "email_modif.htm"
if not exist "%APPDATA%\Microsoft\Signatures\email_modif.txt" (
copy /Y "%APPDATA%\Microsoft\Signatures\email.txt" "%APPDATA%\Microsoft\Signatures\email_modif.txt"
)
)
if exist "%APPDATA%\Microsoft\Signatures\email_modif.txt" (
echo -- > "%APPDATA%\Microsoft\Signatures\email_modif.rtf"
type "%APPDATA%\Microsoft\Signatures\email_modif.txt" >> "%APPDATA%\Microsoft\Signatures\email_modif.rtf"
copy /Y "%APPDATA%\Microsoft\Signatures\email_modif.rtf" "%APPDATA%\Microsoft\Signatures\email_modif.txt"
)
) )

@ -1,3 +0,0 @@
REM Configuration du nom de l'utilisateur dans Office
for /f "Tokens=2*" %%m in ('net user %USERNAME% /domain ^| find "Nom complet"') do SET FULLNAME=%%n
reg add "HKCU\Software\Microsoft\Office\Common\UserInfo" /v "UserName" /d "%FULLNAME%" /t REG_SZ /f"

@ -1,70 +0,0 @@
@echo off
REM Ce script permet de sauvegarder les profiles
REM de Thunderbird et Firefox
REM Il conserve les 10 dernières version de chaque
REM Si la fonction n'est pas activée, on s'arrête là
IF "%MOZBACKUP%" NEQ "yes" GOTO :EOF
REM L'archivage des profile va utiliser 7-Zip
REM On s'arrête si cet outil n'est pas disponible
SET ZIP="%PROGRAMFILES%\7-Zip\7z.exe"
IF NOT EXIST %ZIP% GOTO :EOF
REM Les sauvegardes seront stockées dans un répertoire caché
REM du dossier personnel. Un sous répertoire est créé pour chaque
REM machine de l'utilisateur
SET DEST="\\%IPASSERELLE_IP%\%USERNAME%\.backup\%COMPUTERNAME%"
IF NOT EXIST "%DEST%" mkdir "%DEST%"
IF NOT EXIST "%DEST%" GOTO :EOF
REM Recherche du répertoire de profile de Thunderbird
for /f %%a in ('dir /b "%APPDATA%\Thunderbird\Profiles\*.default"') do SET TBPROFILE=%APPDATA%\Thunderbird\Profiles\%%a
REM Si le répertoire de profile n'existe pas, on s'arrête
IF NOT EXIST "%TBPROFILE%" GOTO :EOF
REM Rotation des anciennes sauvegardes
REM Pas très élégant, mais on fait ce qu'on peut
REM souvenez-vous qu'on est qu'en batch ;-)
IF EXIST "%DEST%\thunderbird10.7z" DEL /Q /F "%DEST%\thunderbird10.7z"
IF EXIST "%DEST%\thunderbird9.7z" REN "%DEST%\thunderbird9.7z" thunderbird10.7z
IF EXIST "%DEST%\thunderbird8.7z" REN "%DEST%\thunderbird8.7z" thunderbird9.7z
IF EXIST "%DEST%\thunderbird7.7z" REN "%DEST%\thunderbird7.7z" thunderbird8.7z
IF EXIST "%DEST%\thunderbird6.7z" REN "%DEST%\thunderbird6.7z" thunderbird7.7z
IF EXIST "%DEST%\thunderbird5.7z" REN "%DEST%\thunderbird5.7z" thunderbird6.7z
IF EXIST "%DEST%\thunderbird4.7z" REN "%DEST%\thunderbird4.7z" thunderbird5.7z
IF EXIST "%DEST%\thunderbird3.7z" REN "%DEST%\thunderbird3.7z" thunderbird4.7z
IF EXIST "%DEST%\thunderbird2.7z" REN "%DEST%\thunderbird2.7z" thunderbird3.7z
IF EXIST "%DEST%\thunderbird1.7z" REN "%DEST%\thunderbird1.7z" thunderbird2.7z
REM On compresse tout le profile, sauf le répertoire ImapMail (qui peut être énorme)
REM le fichier global-message-db.sqlite (peut faire plusieurs Go) et quelques autres fichiers non essentiels
REM Le répertoire ImapMail.old existe sur certains profiles, à exclure également
REM tout comme le répertoire Mail, qui contient des mails récupérés en POP en général
REM On utilise le plus faible taux de compression pour éviter de prendre trop de temps
REM vu que ce script sera lancé à l'ouverture de session
%ZIP% a -t7z -mx1 "%DEST%\thunderbird1.7z" "%TBPROFILE%\*" -x!key3 -xr!"Mail\" -xr!"ImapMail.old\" -xr!"ImapMail_old\" -xr!"ImapMail\" -x!global-messages-db.sqlite -x!Cache -x!SOGoImageCache -x!startupCache -x!places.sqlite -x!urlclassifier3.sqlite -x!cookies.sqlite
REM Maintenant, on rajoute à l'archive les fichiers .dat contenus dans le répertoire ImapMail
REM Ces fichiers contiennent en particulier les filtres des messages
REM pas trouvé comment faire ça en une seule passe
%ZIP% a -t7z -mx1 -r "%DEST%\thunderbird1.7z" "%TBPROFILE%\*.dat"
REM Même chose pour Firefox maintenant
for /f %%a in ('dir /b "%APPDATA%\Mozilla\Firefox\Profiles\*.default"') do SET FFPROFILE=%APPDATA%\Mozilla\Firefox\Profiles\%%a
IF NOT EXIST "%FFPROFILE%" GOTO :EOF
IF EXIST "%DEST%\firefox10.7z" DEL /Q /F "%DEST%\firefox10.7z"
IF EXIST "%DEST%\firefox9.7z" REN "%DEST%\firefox9.7z" firefox10.7z
IF EXIST "%DEST%\firefox8.7z" REN "%DEST%\firefox8.7z" firefox9.7z
IF EXIST "%DEST%\firefox7.7z" REN "%DEST%\firefox7.7z" firefox8.7z
IF EXIST "%DEST%\firefox6.7z" REN "%DEST%\firefox6.7z" firefox7.7z
IF EXIST "%DEST%\firefox5.7z" REN "%DEST%\firefox5.7z" firefox6.7z
IF EXIST "%DEST%\firefox4.7z" REN "%DEST%\firefox4.7z" firefox5.7z
IF EXIST "%DEST%\firefox3.7z" REN "%DEST%\firefox3.7z" firefox4.7z
IF EXIST "%DEST%\firefox2.7z" REN "%DEST%\firefox2.7z" firefox3.7z
IF EXIST "%DEST%\firefox1.7z" REN "%DEST%\firefox1.7z" firefox2.7z
%ZIP% a -t7z -mx1 "%DEST%\firefox1.7z" "%FFPROFILE%\*" -x!key3 -x!Cache -x!OfflineCache -x!mozilla-media-cache -x!*.corrupt

@ -1,6 +1,7 @@
:: Script d'initialisation d'une station de travail :: Script d'initialisation d'une station de travail
call "%~dp0"conf.bat cd "%~dp0"
call conf.bat
net use \\%IPASSERELLE_IP%\wpkg net use \\%IPASSERELLE_IP%\wpkg
net use \\%IPASSERELLE_IP%\wpkglogs net use \\%IPASSERELLE_IP%\wpkglogs
cscript "\\%IPASSERELLE_IP%\wpkg\wpkg.js" /debug /install:wpkg /force /nonotify cscript "\\%IPASSERELLE_IP%\wpkg\wpkg.js" /debug /install:wpkg /force /nonotify

@ -1,6 +1,7 @@
:: Script d'initialisation d'une station de travail :: Script d'initialisation d'une station de travail
call "%~dp0"conf.bat cd "%~dp0"
call conf.bat
net use \\%IPASSERELLE_IP%\wpkg net use \\%IPASSERELLE_IP%\wpkg
net use \\%IPASSERELLE_IP%\wpkglogs net use \\%IPASSERELLE_IP%\wpkglogs
cscript "\\%IPASSERELLE_IP%\wpkg\wpkg.js" /debug /synchronize /nonotify cscript "\\%IPASSERELLE_IP%\wpkg\wpkg.js" /debug /synchronize /nonotify

@ -12,7 +12,7 @@
<profile id="admin" /> <profile id="admin" />
</host> </host>
<host name="SERVER1" profile-id="server" /> <host name="SERVER1 profile-id="default" />
--> -->
<host name=".+" profile-id="workstation" /> <host name=".+" profile-id="workstation" />

@ -11,23 +11,11 @@
<package package-id="tightvnc" /> <package package-id="tightvnc" />
<package package-id="thunderbird" /> <package package-id="thunderbird" />
<!-- <package package-id="thunderbird-config" /> --> <!-- <package package-id="thunderbird-config" /> -->
<!-- <package package-id="lightning" /> -->
<!-- <package package-id="sogo-addons" /> -->
<!-- <package package-id="filelink-dl" /> -->
<!-- <package package-id="clicktodial" /> -->
<!-- <package package-id="firefox-config" /> -->
<package package-id="flash" /> <package package-id="flash" />
<package package-id="pdfcreator" /> <package package-id="pdfcreator" />
<package package-id="adobe_reader" /> <package package-id="adobe_reader" />
<package package-id="adobe_reader_fonts" />
<package package-id="vlc" /> <package package-id="vlc" />
<!-- <package package-id="axcrypt" /> -->
<!-- <package package-id="libreoffice" /> --> <!-- <package package-id="libreoffice" /> -->
<!-- <package package-id="jce" /> -->
<!-- <package package-id="freemind" /> -->
<!-- <package package-id="xmind" /> -->
<!-- <package package-id="userprofile" /> -->
<!-- <package package-id="gajim" /> -->
</profile> </profile>
<!-- Le profile graphiste contient une compilation de logiciels pour <!-- Le profile graphiste contient une compilation de logiciels pour
@ -37,8 +25,6 @@
<package package-id="gimp" /> <package package-id="gimp" />
<package package-id="inkscape" /> <package package-id="inkscape" />
<package package-id="scribus" /> <package package-id="scribus" />
<package package-id="sketchup" />
<package package-id="kompozer" />
</profile> </profile>
<!-- profile d'administrateur, contient quelques outils utiles --> <!-- profile d'administrateur, contient quelques outils utiles -->
@ -61,25 +47,10 @@
<package package-id="skype" /> <package package-id="skype" />
</profile> </profile>
<!-- Outils pour un serveur -->
<profile id="server">
<depends profile-id="admin" />
<package package-id="zabbix_agent" />
</profile>
<!-- Pour les postes en spare, on peut tout deployer -->
<profile id="spares">
<depends profile-id="workstation" />
<package package-id="graphiste" />
<package package-id="iphone" />
<package package-id="skype" />
</profile>
<!-- profile par défaut appliqué à tous les postes --> <!-- profile par défaut appliqué à tous les postes -->
<profile id="default"> <profile id="default">
<depends profile-id="variables" /> <depends profile-id="variables" />
<package package-id="wpkg" /> <package package-id="wpkg" />
<package package-id="settings" />
<package package-id="logs" /> <package package-id="logs" />
<package package-id="cacert" /> <package package-id="cacert" />
<package package-id="productkey" /> <package package-id="productkey" />
@ -90,7 +61,6 @@
<package package-id="sumatrapdf" /> <package package-id="sumatrapdf" />
<package package-id="7zip" /> <package package-id="7zip" />
<package package-id="fusioninventory" /> <package package-id="fusioninventory" />
<package package-id="ultradefrag" />
<!-- patch le registre pour la jonction à un domaine NT 4 <!-- patch le registre pour la jonction à un domaine NT 4
nécessaire uniquement pour les Windows 7 --> nécessaire uniquement pour les Windows 7 -->
<package package-id="sambawin7" os="6\.1\.\d{4}" /> <package package-id="sambawin7" os="6\.1\.\d{4}" />

@ -17,7 +17,7 @@ die "Time argument missing.\n" unless defined ($time);
package esmith; package esmith;
use strict; use strict;
use esmith::AccountsDB;
use esmith::util; use esmith::util;
BEGIN BEGIN
@ -33,8 +33,9 @@ BEGIN
esmith::util::setRealToEffective (); esmith::util::setRealToEffective ();
my $a = esmith::AccountsDB->open_ro() || my %accounts;
die "Couldn't open AccountsDB\n"; tie %accounts, 'esmith::config', '/home/e-smith/db/accounts';
# ------------------------------------------------ # ------------------------------------------------
# Open and read in the template netlogon.bat file. # Open and read in the template netlogon.bat file.
@ -83,7 +84,7 @@ foreach $line ( @infile )
{ {
if ( !$activelevels[ $level ] ) if ( !$activelevels[ $level ] )
{ {
$activelevels[ $level ] = $a->is_user_in_group($curUser, $group); $activelevels[ $level ] = isInGroup($curUser, $group);
} }
} }
@ -206,3 +207,33 @@ chmod ( 0744, "$netlogonFile" );
exit (0); exit (0);
# --------------------------------------------------
# Subroutine to check if a given user is in a group:
# --------------------------------------------------
sub isInGroup($$)
{
my ($user, $group) = @_;
my $value = $accounts{$group};
if ( defined ($value) )
{
my ($type, %properties) = split (/\|/, $value);
if ($type eq 'group')
{
my @members = split (/,/, $properties {'Members'});
my $member;
# TODO: grep (/^$user$/, @members)
foreach $member ( @members )
{
if ( $member eq $user )
{
return 1;
}
}
}
}
return 0;
}

@ -61,7 +61,7 @@ sub save_change {
} }
print LOGON $logon; print LOGON $logon;
close LOGON; close LOGON;
$c->set_prop('smb', 'LogonDrive', $drive); $c->set_prop('smb', 'HomeDrive', $drive);
unless ( system ("/sbin/e-smith/signal-event", "workgroup-update") == 0 ){ unless ( system ("/sbin/e-smith/signal-event", "workgroup-update") == 0 ){
return $self->error('ERROR_OCCURED');; return $self->error('ERROR_OCCURED');;
} }

@ -1,84 +0,0 @@
<?php
ini_set('log_errors', 1);
ini_set('display_errors', 0);
require('conf.php');
if(isset($_SERVER['QUERY_STRING']) && preg_match('/^.+@' . DOMAIN . '$/', $_SERVER['QUERY_STRING'])) {
$temp = explode('@', $_SERVER['QUERY_STRING']);
$uid = $temp[0];
// Bind to the LDAP server
// Not used for now, but might be usefull one day to generate conf per group or per user
$link = @ldap_connect(LDAP_SERVER) or die ("Couldn't connect to the LDAP server");
ldap_set_option($link, LDAP_OPT_PROTOCOL_VERSION, 3);
@ldap_bind($link) or die ("Couldn't bind to the LDAP server");
// Lookup the user
$result = ldap_search($link, USER_BASE, "uid=" . $uid);
$user = ldap_get_entries($link, $result);
if($user['count'] == 0) {
// user not found
exit;
}
$pref = FF_PREF;
// Don't lock pref if the user is member of some special groups
// regardless of the setting
foreach ($user[0]['posixmemberof'] as $group){
if (in_array($group, $NOENFORCEGROUPS)){
$pref = 'defaultPref';
break;
}
}
$url = HOME_URL;
if (preg_match('/^https?:\/\//', $user[0]['labeleduri'][0]))
$url = $user[0]['labeleduri'][0];
}
else {
exit;
}
?>
// Load Services.jsm, might be usefull
Components.utils.import("resource://gre/modules/Services.jsm");
// Disable auto updates
<?php echo $pref;?>("app.update.enabled", false);
<?php echo $pref;?>("app.update.auto", false);
// Extensions
<?php echo $pref;?>("extensions.installDistroAddons", true);
<?php echo $pref;?>("extensions.enabledScopes", 13);
<?php echo $pref;?>("extensions.autoDisableScopes", 2);
// Disable the "know your rights" message
<?php echo $pref;?>("browser.rights.3.shown", true);
// Home page
<?php
if ($pref == 'defaultPref'){
// startup.homepage is a complex setting.
// see http://mike.kaply.com/2012/08/29/setting-the-default-firefox-homepage-with-autoconfig/
$url = 'data:text/plain,browser.startup.homepage='.$url;
}
?>
<?php echo $pref;?>("browser.startup.homepage", "<?php echo $url;?>");
<?php echo $pref;?>("browser.startup.page", 1);
<?php echo $pref;?>("startup.homepage_override_url", "");
<?php echo $pref;?>("startup.homepage_welcome_url", "");
// Do not check for default browser
<?php echo $pref;?>("browser.shell.checkDefaultBrowser", false);
// Block 3rd party cookies
<?php echo $pref;?>("network.cookie.cookieBehavior", 1);
<?php
// Include other conf fragment if they exist
if (is_array(glob("firefox.mod.*.php"))){
foreach (glob("firefox.mod.*.php") as $filename){
require($filename);
}
}
?>

@ -2,99 +2,49 @@
ini_set('log_errors', 1); ini_set('log_errors', 1);
ini_set('display_errors', 0); ini_set('display_errors', 0);
require('conf.php'); require('thunderbird.conf.php');
if(isset($_SERVER['QUERY_STRING']) && preg_match('/^.+@' . DOMAIN . '$/', $_SERVER['QUERY_STRING'])) { if(isset($_SERVER['QUERY_STRING']) && preg_match('/^.+@' . DOMAIN . '$/', $_SERVER['QUERY_STRING'])) {
$temp = explode('@', $_SERVER['QUERY_STRING']); $temp = explode('@', $_SERVER['QUERY_STRING']);
$uid = $temp[0]; $uid = $temp[0];
// Bind to the LDAP server //Connexion a l'annuaire LDAP
$link = @ldap_connect(LDAP_SERVER) or die ("Couldn't connect to the LDAP server"); $link = @ldap_connect(LDAP_SERVER) or die ('connexion echouee');
ldap_set_option($link, LDAP_OPT_PROTOCOL_VERSION, 3); ldap_set_option($link, LDAP_OPT_PROTOCOL_VERSION, 3);
@ldap_bind($link) or die ("Couldn't bind to the LDAP server"); @ldap_bind($link) or die ('identification echouee');
// Lookup the user // Recherche de l'utilisateur demandé
$result = ldap_search($link, USER_BASE, "uid=" . $uid); $result = ldap_search($link, USER_BASE, "uid=" . $uid);
$user = ldap_get_entries($link, $result); $user = ldap_get_entries($link, $result);
$configaccounts = 1;
if($user['count'] == 0) { if($user['count'] == 0) {
$result = ldap_search($link, USER_BASE, "mail=" . $_SERVER['QUERY_STRING']); // user not found
$user = ldap_get_entries($link, $result); exit;
if ($user['count'] == 1){
// If we received an valid email address and not an uid
// considere TB as already configured
// so we don't need to generate accounts config
// only general settings will be sent
$configaccounts = 0;
}
else{
// user not found
header("HTTP/1.1 403 Forbidden");
exit;
}
}
$pref = TB_PREF;
// Don't lock pref if the user is member of some special groups
// regardless of the setting
foreach ($user[0]['posixmemberof'] as $group){
if (in_array($group, $NOENFORCEGROUPS)){
$pref = 'defaultPref';
break;
}
}
// Stop here if the user is not part of the whitelist groups
if (count($WHITELISTGROUPS) > 0){
$conf = 0;
foreach ($user[0]['posixmemberof'] as $group){
if (in_array($group, $WHITELISTGROUPS)){
$conf = 1;
break;
}
}
if ($conf != 1){
header("HTTP/1.1 403 Forbidden");
exit;
}
} }
} }
else { else {
// We've not received a valid email address
header("HTTP/1.1 403 Forbidden");
exit; exit;
} }
if ($configaccounts == 1){
?> ?>
// Linux / UNIX ?
if(getenv("USER") != "") {
var path_sep = '/';
var path_profile = getenv("HOME");
}
// Windows ?
else {
var path_sep = '\\';
var path_profile = getenv("USERPROFILE");
}
// Local Account // Compte local
<?php echo $pref;?>("mail.account.account1.server", "server1"); <?php echo PREF;?>("mail.account.account1.server", "server1");
<?php echo $pref;?>("mail.accountmanager.localfoldersserver", "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.directory-rel", "[ProfD]Mail/Local Folders");
<?php echo $pref;?>("mail.server.server1.hostname", "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.name", "Dossiers locaux");
<?php echo $pref;?>("mail.server.server1.type", "none"); <?php echo PREF;?>("mail.server.server1.type", "none");
<?php echo $pref;?>("mail.server.server1.userName", "nobody"); <?php echo PREF;?>("mail.server.server1.userName", "nobody");
// SMTP config // SMTP
<?php echo $pref;?>("mail.smtp.defaultserver", "smtp1"); <?php echo PREF;?>("mail.smtp.defaultserver", "smtp1");
<?php echo $pref;?>("mail.smtpservers", "smtp1"); <?php echo PREF;?>("mail.smtpservers", "smtp1");
<?php echo $pref;?>("mail.smtpserver.smtp1.try_ssl", 3); <?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.port", <?php echo SMTP_PORT; ?>);
<?php echo $pref;?>("mail.smtpserver.smtp1.hostname", "<?php echo SMTP_SERVER; ?>"); <?php echo PREF;?>("mail.smtpserver.smtp1.hostname", "<?php echo SMTP_SERVER; ?>");
<?php echo $pref;?>("mail.smtpserver.smtp1.username", "<?php echo $uid; ?>"); <?php echo PREF;?>("mail.smtpserver.smtp1.username", "<?php echo $uid; ?>");
// Default account is acocunt2 (the personal account) // Compte par défaut
<?php echo $pref;?>("mail.accountmanager.defaultaccount", "account2"); <?php echo PREF;?>("mail.accountmanager.defaultaccount", "account2");
<?php <?php
@ -105,89 +55,65 @@ $server = 2;
$accountlist = 'account1'; $accountlist = 'account1';
$identities = '' $identities = ''
?> ?>
// Compte personnel
// Personnal account <?php echo PREF;?>("mail.account.account2.server", "server<?php echo $server?>");
<?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.hostname", "<?php echo IMAP_SERVER; ?>"); <?php echo PREF;?>("mail.server.server2.name", "<?php echo $user[0]['mail'][0]; ?>");
<?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.port", <?php echo IMAP_PORT; ?>); <?php echo PREF;?>("mail.server.server2.socketType", 3);
<?php echo $pref;?>("mail.server.server2.socketType", 3); <?php echo PREF;?>("mail.server.server2.type", "imap");
<?php echo $pref;?>("mail.server.server2.type", "imap"); <?php echo PREF;?>("mail.server.server2.userName", "<?php echo $uid; ?>");
<?php echo $pref;?>("mail.server.server2.userName", "<?php echo $uid; ?>");
<?php <?php
for ($i=0; $i < count($user[0]['mail'])-1; $i++){ for ($i=0; $i < count($user[0]['mail'])-1; $i++){
?> ?>
<?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; ?>.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; ?>.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; ?>.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; ?>.useremail", "<?php echo $user[0]['mail'][$i]; ?>");
<?php echo $pref;?>("mail.identity.id<?php echo $id; ?>.valid", true); <?php echo PREF;?>("mail.identity.id<?php echo $id; ?>.valid", true);
<?php echo $pref;?>("mail.identity.id<?php echo $id; ?>.fcc_folder_pickup_mode", "1"); defaultPref("mail.identity.id<?php echo $id; ?>.fcc_folder", "imap://<?php echo $uid; ?>@<?php echo IMAP_SERVER; ?>/Sent");
<?php echo $pref;?>("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");
<?php echo $pref;?>("mail.identity.id<?php echo $id; ?>.drafts_folder_pickup_mode", "1"); defaultPref("mail.identity.id<?php echo $id; ?>.stationery_folder", "imap://<?php echo $uid; ?>@<?php echo IMAP_SERVER; ?>/Templates");
<?php echo $pref;?>("mail.identity.id<?php echo $id; ?>.draft_folder", "imap://<?php echo $uid; ?>@<?php echo IMAP_SERVER; ?>/Drafts"); defaultPref("mail.identity.id<?php echo $id; ?>.attach_signature", true);
<?php echo $pref;?>("mail.identity.id<?php echo $id; ?>.templ_folder_pickup_mode", "1"); defaultPref("mail.identity.id<?php echo $id; ?>.sig_file-rel", "[ProfD]../../../../../signature/email.html");
<?php echo $pref;?>("mail.identity.id<?php echo $id; ?>.stationery_folder", "imap://<?php echo $uid; ?>@<?php echo IMAP_SERVER; ?>/Templates");
<?php echo $pref;?>("mail.identity.id<?php echo $id; ?>.reply_on_top", 1);
<?php echo $pref;?>("mail.identity.id<?php echo $id; ?>.attach_signature", true);
<?php echo $pref;?>("mail.identity.id<?php echo $id; ?>.sig_file", path_profile+path_sep+"signature"+path_sep+"email.html");
<?php echo $pref;?>("mail.identity.id<?php echo $id; ?>.sig_on_fwd", true);
<?php echo $pref;?>("mail.identity.id<?php echo $id; ?>.sig_on_reply", true);
<?php <?php
//$accountlist .= ',account' . $account;
$identities .= ',id' . $id; $identities .= ',id' . $id;
$account++; $account++;
$id++; $id++;
} }
?> ?>
<?php echo $pref;?>("mail.account.account2.identities", "<?php echo $identities;?>"); <?php echo PREF;?>("mail.account.account2.identities", "<?php echo $identities;?>");
<?php echo $pref;?>("mail.accountmanager.accounts", "account1,account2"); <?php echo PREF;?>("mail.accountmanager.accounts", "account1,account2");
// Mise a jour
<?php echo PREF;?>("app.update.enabled", false);
<?php echo PREF;?>("app.update.auto", false);
<?php // Extension
// End if for account settings <?php echo PREF;?>("extensions.installDistroAddons", true);
} <?php echo PREF;?>("extensions.enabledScopes", 13);
?> <?php echo PREF;?>("extensions.autoDisableScopes", 2);
// Disable auto updates
<?php echo $pref;?>("app.update.enabled", false);
<?php echo $pref;?>("app.update.auto", false);
// Extensions
<?php echo $pref;?>("extensions.installDistroAddons", true);
<?php echo $pref;?>("extensions.enabledScopes", 13);
<?php echo $pref;?>("extensions.autoDisableScopes", 2);
// Spam // Spam
<?php echo $pref;?>("mail.adaptivefilters.junk_threshold", 500); <?php echo PREF;?>("mail.adaptivefilters.junk_threshold", 500);
// Checks IMAP folders // Checks
<?php echo $pref;?>("mail.check_all_imap_folders_for_new", true); defaultPref("mail.check_all_imap_folders_for_new", true);
// Composition // Composition
<?php echo $pref;?>("mail.default_html_action", 3); defaultPref("mail.default_html_action", 3);
// Attachments // Pièces jointes
<?php echo $pref;?>("mail.content_disposition_type", 1); defaultPref("mail.content_disposition_type ", 1);
// Expunge // Expunge
<?php echo $pref;?>("mail.imap.expunge_option", 3); defaultPref("mail.imap.expunge_option", 3);
<?php echo $pref;?>("mail.imap.expunge_threshold_number", 100); defaultPref("mail.imap.expunge_threshold_number", 100);
// Adds the domain from your email address to the
// recipients email address if it doesn't have a domain
<?php echo $pref;?>("mail.enable_autocomplete", true);
// Hide useless messages
<?php echo $pref;?>("mail.ui.show.migration.on.upgrade", false);
<?php echo $pref;?>("app.update.showInstalledUI", false);
<?php echo $pref;?>("browser.startup.homepage_override.mstone", "ignore");
<?php echo $pref;?>("mailnews.start_page_override.mstone", "ignore");
<?php echo $pref;?>("mail.rights.version", 1);
<?php <?php
// Include other conf fragment if they exist
if (is_array(glob("thunderbird.mod.*.php"))){ if (is_array(glob("thunderbird.mod.*.php"))){
foreach (glob("thunderbird.mod.*.php") as $filename){ foreach (glob("thunderbird.mod.*.php") as $filename){
require($filename); require($filename);

Loading…
Cancel
Save