GetAllDLUsers
Appearance
Zimbra Script to get all users email from all DLs[edit]
Step1 :- Create all the files (like file,file2 etc.. ) given below in the script[edit]
Note:--- First get all the DLs (Distributed List) using the below cammand :-
- zmprov -gadl > /tmp/alldl
- touch /tmp/file2
- vim /tmp/dlgetuser.sh
- !/bin/bash
file=/tmp/alldl file2=/tmp/allmem zmprov gadl > $file
for i in `cat $file`
do
echo $i >> $file2 zmprov gdl $i | grep "zimbraMailForwardingAddress:" | awk {'print $2'} >> $file2 echo " " >> $file2 printf "\n" >> $file2 done
- wq!
Step2:- Then run the script[edit]
- sh -x /tmp/dlgetuser.sh