Script Export Import akun Di zimbra 8.8 - BOOKC -->

Script Export Import akun Di zimbra 8.8

Saturday, October 26, 2019

ini hanya untuk mendapatkan akun email :

#!/bin/sh
#Hapus Layar
clear
echo -e "###################################################################################"
echo -e "# Zimbra Export akun                                              #"
echo -e "###################################################################################"
USERS=`su - zimbra -c 'zmprov -l gaa'`;
echo -e $ibold"Processing account, please wait.............................."$ebold
for ACCOUNT in $USERS; do
echo " Export Akun $ACCOUNT"
NAME=`echo $ACCOUNT`;
DOMAIN=`echo $ACCOUNT | awk -F@ '{print $2}'`;
ACCOUNT=`echo $ACCOUNT | awk -F@ '{print $1}'`;
ACC=`echo $ACCOUNT | cut -d '.' -f1`
echo "$NAME" >> /home/zimbra-akun.list;
done
echo "Selesai";
Untuk Script Import 
#!/bin/bash
#clear
echo "Mulai Proses import..."
for i in `cat /root/zimbra-akun.list`;do
#zmprov ma `echo $i | awk -F, '{print $1 " userPassword " $2}'`;
su - zimbra -c "zmprov ca $i defaultpassword";
echo "Akun sudah dibuat "$i
done