The procedure is can be done from the command line:
First create a Folder per user to store the public folders in:
$ zmmailbox -z -m user@domain.be cf --view message /PublicFolders
Then for every public folder account, share it's inbox with that user:
$ zmmailbox -z -m pubfolder@domain.be mfg /Inbox account user@domain.be rwidx
Then mount the share for the user:
$ zmmailbox -z -m user@domain.be cm --view message /PublicFolders/Pubfolder pubfolder@domain.be /Inbox
You can ofcourse script it, with something like this... (will output a script you feed to 'zmmailbox -z')
-------------[ python code ]--------
allusers = ['user1@domain.be', 'user2@domain.be', 'user3@domain.be']
pubfolders = ['folder1@domain.be', 'folder2@domain.be']
def createPublicFolderMap(users):
'''
create a folder to act as a parent for all the public folder submaps
'''
for user in users:
print "selectMailbox " + user
print "createFolder --view message /PublicFolders"
def createAndSharePubFolder(folder, users):
'''
creates the share on the public folder's inbox to the users
and creates a share mountpoint in the users for that inbox
'''
folderName = folder[:folder.find('@')]
folderName = folderName[0].upper()+folderName[1:]
print "selectMailbox " + folder
for user in users:
print "modifyFolderGrant /Inbox account "+user+" rwidx"
for user in users:
print "selectMailbox " + user
print "createMountPoint --view message /PublicFolders/" \
+folderName+" "+folder+" /Inbox"
createPublicFolderMap(allusers)
for pubfolder in pubfolders:
createAndSharePubFolder(pubfolder, allusers)
-------------[ python code ]--------
No comments:
Post a Comment