GetAllDLUsers: Difference between revisions
Appearance
Created page with "Category: OrientBell Category: Zimbra ===='''Zimbra Script to get all users email from all DLs'''==== == Step1 :- Create all the files (like file,file2 etc.. ) give..." |
No edit summary |
||
| Line 1: | Line 1: | ||
[[Category: | [[Category: Orient Bell]] | ||
[[Category: Zimbra]] | [[Category: Zimbra]] | ||
Latest revision as of 16:17, 14 July 2014
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