for user in `cat /opt/zimbra/nfsbackup/migration/accounts/users.txt`;do zmprov ga $user zimbraMailSieveScript > filters/$user-filters.txt ;done
for user in `cat /opt/zimbra/nfsbackup/migration/accounts/users.txt`;doecho"Exporting Filters : $user";zmprov ga $user zimbraMailSieveScript > filters/$user-filters.txt ;done
sed -i -e "1d" /opt/zimbra/nfsbackup/migration/filters/*
sed -i -e "1d" /opt/zimbra/nfsbackup/migration/filters/*
sed -i -e 's/zimbraMailSieveScript: //g' /opt/zimbra/nfsbackup/migration/filters/*
sed -i -e 's/zimbraMailSieveScript: //g' /opt/zimbra/nfsbackup/migration/filters/*
if[$RCODE -eq 1];then
if[$RCODE -eq 1];then
@ -23,7 +23,7 @@ if [ $RCODE -eq 0 ]; then
fi
fi
if[$RCODE -eq 0];then
if[$RCODE -eq 0];then
echo"Export des signatures"
echo"Export des signatures"
for user in `cat /opt/zimbra/nfsbackup/migration/accounts/users.txt`;do zmprov ga $user zimbraPrefMailSignatureHTML > sig/$user-sig.txt ;done
for user in `cat /opt/zimbra/nfsbackup/migration/accounts/users.txt`;doecho"Exporting Default Signature : $user";zmprov ga $user zimbraPrefMailSignatureHTML > sig/$user-sig.txt ;done
sed -i -e "1d" /opt/zimbra/nfsbackup/migration/sig/*
sed -i -e "1d" /opt/zimbra/nfsbackup/migration/sig/*
sed -i -e 's/zimbraMailSieveScript: //g' /opt/zimbra/nfsbackup/migration/sig/*
sed -i -e 's/zimbraMailSieveScript: //g' /opt/zimbra/nfsbackup/migration/sig/*
for user in `cat /opt/zimbra/nfsbackup/migration/accounts/users.txt`;doecho"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`;doecho"Import des signatures: $user"; zmprov csig $user default zimbraPrefMailSignatureHTML "`cat /opt/zimbra/nfsbackup/migration/sig/$user-sig.txt`";done