You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

34 lines
1.3 KiB

  1. #!/bin/bash
  2. RCODE=$?
  3. for mailbox in `cat /opt/zimbra/nfsbackup/migration/accounts/users.txt`;
  4. do
  5. zmmailbox -z -t 0 -m $mailbox postRestURL -u "https://127.0.0.1:7071" "//?fmt=tgz&resolve=modify" ./$mailbox.tgz ; echo "$mailbox - done ";
  6. done
  7. if [ $RCODE -eq 1 ]; then
  8. echo "erreur dans l'import'"
  9. exit 1;
  10. fi
  11. if [ $RCODE -eq 0 ]; then
  12. echo "Import des Filtres"
  13. 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
  14. if [ $RCODE -eq 1 ]; then
  15. echo "erreur dans l'import des filtres'"
  16. exit 1;
  17. fi
  18. if [ $RCODE -eq 0 ]; then
  19. echo "Import des signatures"
  20. for user in `cat /opt/zimbra/nfsbackup/migration/accounts/users.txt`; do echo "Import des signatures: $user"; zmprov csig $user default zimbraPrefMailSignatureHTML "`cat /opt/zimbra/nfsbackup/migration/sig/$user-sig.txt`";done
  21. if [ $RCODE -eq 1 ]; then
  22. if [ $RCODE -eq 1 ]; then
  23. echo "erreur dans l'import des Signatures'"
  24. exit 1;
  25. fi
  26. if [ $RCODE -eq 0 ]; then
  27. echo "Import terminée'"
  28. exit;
  29. fi
  30. fi
  31. fi