Zimbra offers Open Source email server software and shared calendar for Linux and the Mac
Go Back   Zimbra :: Forums > Zimbra Collaboration Suite > Administrators

Welcome to the Zimbra :: Forums!
Welcome, if you would like to post a comment please register. We also encourage you to explore all things Zimbra with our team and members of the community.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 09-10-2009, 02:33 PM
Loyal Member
 
Posts: 87
Default Distribution List Management

Is there an easier way to manage distribution lists easier? It is somewhat of a pain to add them each individually after you add their email. It would be nice if you could specify in the COS the default dist list that every newly created user is in.

Also, if after you've added 50 new users, you could go into the dist list and compare what is already in specified dist list, to all email accounts, then have it show you which ones are not in the dist list so you could add them in bulk.

Any tips on this sort of thing? Because where I am at right now, I have 240 email accounts, 170 or so in the dist list that I want all 240 in. So I will have to go through and cross check the 170 to 240, and manually add the missing 70. Not fun!

Thanks!
Reply With Quote
  #2 (permalink)  
Old 09-11-2009, 01:15 AM
Active Member
 
Posts: 32
Default

Yep, that is one feature, i would also require.
It will be a great help in our institutional scenario.
Reply With Quote
  #3 (permalink)  
Old 09-11-2009, 01:26 AM
Moderator
 
Posts: 7,928
Default

Code:
$ zmprov help list

  addDistributionListAlias(adla) {list@domain|id} {alias@domain}

  addDistributionListMember(adlm) {list@domain|id} {member@domain}+

  createDistributionList(cdl) {list@domain}

  deleteDistributionList(ddl) {list@domain|id}

  getAllDistributionLists(gadl) [{domain}]

  getDistributionList(gdl) {list@domain|id} [attr1 [attr2...]]

  getDistributionListMembership(gdlm) {name@domain|id}

  modifyDistributionList(mdl) {list@domain|id} attr1 value1 [attr2 value2...]

  removeDistributionListAlias(rdla) {list@domain|id} {alias@domain}

  removeDistributionListMember(rdlm) {list@domain|id} {member@domain}

  renameDistributionList(rdl) {list@domain|id} {newName@domain}
And also file a RFE for the feature request in the Admin GUI.
__________________
Reply With Quote
  #4 (permalink)  
Old 09-11-2009, 02:01 AM
Elite Member
 
Posts: 296
Default

it makes me crazy to drag-and-drop in the *slow* ZCS admin console, and i suggest you can try to write a script like this :

1. get all account for specific COS or if you don't have specfic COS for users, then get all account list from ZCS
2. get all member of that distribution list, e.g. you have all@example.com for all employee in company?
3. compare and extract the difference
4. add/remove such difference to all@example.com

Code:
# get all accounts and
# assume you want to remove several system accounts first
# and don't forget to SORT it first
zmprov gaa | sed /admin/d | sed /wiki/d | sed /spam./d | sed /ham./d | sort > account.txt
# if you are search all users who belongs to specific COS, 
# then uncomment these lines.      
# and cos_id can be found by zmprov gc <cos_name> | grep  "zimbraId:"
# zmprov sa zimbraCOSId=<cos_id> > account.txt



# get all members of your distribution list, e.g. all@example.com
# again, SORT it first
zmprov gdl all@example.com | grep "zimbraMailForwardingAddress" | cut -d' ' -f2 | sort > member.txt

# compare and get the difference
comm -2 -3 account.txt member.txt > add.txt
comm -1 -3 account.txt member.txt > del.txt

# add new member
cat add.txt |
while read line; do
  echo "add new member : $line"
  zmprov adlm all@example.com $line
done

# and this is to remove 
cat del.txt |
while read line; do
  echo "remove member : $line"
  zmprov rdlm all@example.com $line
done
Remember to modify it to meet your environment.
Reply With Quote
  #5 (permalink)  
Old 09-11-2009, 02:09 AM
Outstanding Member
 
Posts: 594
Default

Looks fine to me
Reply With Quote
  #6 (permalink)  
Old 09-11-2009, 12:46 PM
Loyal Member
 
Posts: 87
Default

I hate notepad. Thanks Tiger! Works AWESOME!

Last edited by physikal; 09-11-2009 at 01:26 PM..
Reply With Quote
  #7 (permalink)  
Old 09-14-2009, 05:59 AM
Elite Member
 
Posts: 380
Default

google://gvim
__________________
Jay R. Ashworth - ZCS 6.0.9CE/CentOS5 - St Pete FL US - Music - Blog - Photography - IANAL - IAAMA
Try to Ask Questions The Smart Way -- you'll get better answers.

Put your product and version in your profile/signature - All opinions strictly my own, even though I have an employer these days.
If you [SOLVE] something, please tell everyone how for the archives
And, please... read what people write, and answer the questions they asked, not the ones they didn't.
Reply With Quote
  #8 (permalink)  
Old 09-15-2009, 02:47 AM
Elite Member
 
Posts: 338
Default

or you can use my perl script
you only enter list of account and distribtion list to import account
note: account and distribution list name are seperated by ","
a tool to add user to a distribution list
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads

Why Join?

Registering let's you ask questions, makes it easier to search, displays any files attached to posts, and notifies you about replies.

blog.zimbra.com




 

SEO by vBSEO ©2011, Crawlability, Inc.