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 01-22-2009, 08:04 AM
Starter Member
 
Posts: 2
Default Sharing, Mounting and Distribution Lists

Hi!
My Problem:
I want to share a lot of things to my users - to different groups wich may contain other groups(3k).
Here's the script I'm using for managing the shares (atm the script does only the sharing, the permissions have to be set in the gui.)

#!/usr/bin/perl

print "Groupname? ";
chomp ($distributionlist = <>);
print "Domain of the Group? (without @) ";
chomp ($listdomain = <>);
print "Name of the Share? ";
chomp ($share = <>);
print "Name of Mountpoint? ";
chomp ($name = <>);
print "Account Name of the original Share? ";
chomp ($accountname = <>);
print "Domain of the Account? (without @) ";
chomp ($domainname = <>);
my $gdl = `/opt/zimbra/bin/zmprov gdl $distributionlist\@$listdomain|grep zimbraMailForwardingAddress:`;
my @dlmembers = split('\n', $gdl);
foreach $member(@dlmembers){
$member =~ s/zimbraMailForwardingAddress:\s*|\s*$//g;
print " - Got member '$member'.\n";
system("zmmailbox -z -m $member createMountpoint /$name $accountname\@$domainname /$share");
}

It works fine with groups which do not have other groups included.
Is there any way to get all accounts of a "group-hierarchy"?

thanks!
Reply With Quote
  #2 (permalink)  
Old 01-22-2009, 09:37 AM
Moderator
 
Posts: 1,554
Default

having just learned what this does this morning, the command zmprov gdlm listname will get you all distribution lists that are a member of that parent. does this help you?
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


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.