Sébastien Faton 9 months ago
parent
commit
5843db07fd
  1. 7
      zimbra/Migration/1_export_accounts.sh
  2. 7
      zimbra/Migration/2_import_accounts.sh
  3. 7
      zimbra/Migration/3_exports_final.sh
  4. 7
      zimbra/Migration/3_exports_mailboxes.sh
  5. 7
      zimbra/Migration/4_imports_mailboxes.sh
  6. 8
      zimbra/Migration/5_exports_filters_and_sig.sh
  7. 8
      zimbra/Migration/6_imports_filters_and_sig.sh

7
zimbra/Migration/1_export_accounts.sh

@ -7,6 +7,13 @@ fi
``` )
RCODE=$?
if [ $(id -u) -eq 0 ]
then
echo "Ce script ne doit pas être lancé en tant que root"
exit 1
fi
echo "Saisir le domaine :"
read DOM

7
zimbra/Migration/2_import_accounts.sh

@ -1,5 +1,12 @@
#!/bin/bash
RCODE=$?
if [ $(id -u) -eq 0 ]
then
echo "Ce script ne doit pas être lancé en tant que root"
exit 1
fi
echo "Importation des comptes :"
PASSWORDS="passwords"

7
zimbra/Migration/3_exports_final.sh

@ -1,5 +1,12 @@
#!/bin/bash
RCODE=$?
if [ $(id -u) -eq 0 ]
then
echo "Ce script ne doit pas être lancé en tant que root"
exit 1
fi
echo "Export mailboxes :"
for user in `cat /opt/zimbra/nfsbackup/migration/accounts/users.txt`;

7
zimbra/Migration/3_exports_mailboxes.sh

@ -1,5 +1,12 @@
#!/bin/bash
RCODE=$?
if [ $(id -u) -eq 0 ]
then
echo "Ce script ne doit pas être lancé en tant que root"
exit 1
fi
echo "Export mailboxes :"
for user in `cat /opt/zimbra/nfsbackup/migration/accounts/users.txt`;

7
zimbra/Migration/4_imports_mailboxes.sh

@ -1,5 +1,12 @@
#!/bin/bash
RCODE=$?
if [ $(id -u) -eq 0 ]
then
echo "Ce script ne doit pas être lancé en tant que root"
exit 1
fi
for mailbox in `cat /opt/zimbra/nfsbackup/migration/accounts/users.txt`;
do

8
zimbra/Migration/5_exports_filters_and_sig.sh

@ -1,5 +1,13 @@
#!/bin/bash
RCODE=$?
if [ $(id -u) -eq 0 ]
then
echo "Ce script ne doit pas être lancé en tant que root"
exit 1
fi
echo "Export des Filtres"
for user in `cat /opt/zimbra/nfsbackup/migration/accounts/users.txt`; do echo "Exporting Filters : $user" ; zmprov ga $user zimbraMailSieveScript > filters/$user-filters.txt ;done
sed -i -e "1d" /opt/zimbra/nfsbackup/migration/filters/*

8
zimbra/Migration/6_imports_filters_and_sig.sh

@ -1,6 +1,14 @@
#!/bin/bash
RCODE=$?
if [ $(id -u) -eq 0 ]
then
echo "Ce script ne doit pas être lancé en tant que root"
exit 1
fi
echo "Import des Filtres"
for user in `cat /opt/zimbra/nfsbackup/migration/accounts/users.txt`; do echo "Importation des filtres : $user"; zmprov ma $user zimbraMailSieveScript "`cat /opt/zimbra/nfsbackup/migration/filters/$user-filters.txt`";done
if [ $RCODE -eq 1 ]; then

Loading…
Cancel
Save