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.
35 lines
1.3 KiB
35 lines
1.3 KiB
#!/bin/bash
|
|
RCODE=$?
|
|
|
|
for mailbox in `cat /opt/zimbra/nfsbackup/migration/accounts/users.txt`;
|
|
do
|
|
zmmailbox -z -t 0 -m $mailbox postRestURL -u "https://127.0.0.1:7071" "//?fmt=tgz&resolve=modify" ./$mailbox.tgz ; echo "$mailbox - done ";
|
|
done
|
|
|
|
if [ $RCODE -eq 1 ]; then
|
|
echo "erreur dans l'import'"
|
|
exit 1;
|
|
fi
|
|
|
|
if [ $RCODE -eq 0 ]; then
|
|
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
|
|
echo "erreur dans l'import des filtres'"
|
|
exit 1;
|
|
fi
|
|
if [ $RCODE -eq 0 ]; then
|
|
echo "Import des signatures"
|
|
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
|
|
if [ $RCODE -eq 1 ]; then
|
|
if [ $RCODE -eq 1 ]; then
|
|
echo "erreur dans l'import des Signatures'"
|
|
exit 1;
|
|
fi
|
|
if [ $RCODE -eq 0 ]; then
|
|
echo "Import terminée'"
|
|
exit;
|
|
fi
|
|
fi
|
|
|
|
fi
|