Dynamic Distribution List in Zimbra

Creating a Dynamic Distribution List

This creates the DL. All new and existing accounts become part of this newly-created DL. In this case, it will add all users, GAL account names, and spam/ham account names, as they are also accounts on your environment.

$ zmprov cddl all@domain.com memberURL 'ldap:///??sub?(objectClass=zimbraAccount)' zimbraIsACLGroup FALSE


Using COS

This DL can be refined by modifying the filter. Therefore, the recommended approach is to create a COS called users, assign all users to that COS, and then modify the command as follows:

$ zmprov cddl allusers@domain.com memberURL 'ldap:///??sub?(&(objectClass=zimbraAccount)(zimbraCOSId=53b3ab9e-f414-4eb7-bd98-393b62de15d3))' zimbraIsACLGroup FALSE

Where zimbraCOSId=53b3ab9e-f414-4eb7-bd98-393b62de15d3 is COS ID of the COS created to, which all users are assigned. If a user is assigned to any other COS, the user will not be a member of this DL.


Examples

Dynamic DL containing all Active users:

$ zmprov cddl allusers@domain.com memberURL 'ldap:///??sub?(&(objectClass=zimbraAccount)(zimbraCOSId=53b3ab9e-f414-4eb7-bd98-393b62de15d3)(zimbraAccountStatus=active))' zimbraIsACLGroup FALSE

Dynamic DL containing all Managers:

$ zmprov cddl allusers@domain.com memberURL 'ldap:///??sub?(&(objectClass=zimbraAccount)(zimbraCOSId=53b3ab9e-f414-4eb7-bd98-393b62de15d3)(title=Manager))' zimbraIsACLGroup FALSE 

Note: For this, set the Job Title of the user as Manager, in order to create a Dynamic Distribution List based on your Job Title.

Dynamic DL containing all Delegated Admins:

$ zmprov cddl allusers@domain.com memberURL 'ldap:///??sub?(&(objectClass=zimbraAccount)(zimbraCOSId=53b3ab9e-f414-4eb7-bd98-393b62de15d3)(zimbraIsDelegatedAdminAccount=TRUE))' zimbraIsACLGroup FALSE

Modifying the member URL can result in a Dynamic Distribution List suiting the requirement, and hence there can be Dynamic Distribution Lists for all mobile users, or POP/IMAP, etc.

Modifying a Dynamic Distribution List

To modify a DL to include users from a specific COS:

$ zmprov mdl all@domain.com memberURL 'ldap:///??sub?(&(objectClass=zimbraAccount)(zimbraCOSId=53b3ab9e-f414-4eb7-bd98-393b62de15d3))'


If you have created Distribution List from GUI and then want to modify it then you will have to set 'zimbraIsACLGroup FALSE' for that DL:

$ zmprov mdl all@domain.com memberURL 'ldap:///??sub?(&(objectClass=zimbraAccount)(zimbraCOSId=53b3ab9e-f414-4eb7-bd98-393b62de15d3))' zimbraIsACLGroup FALSE


Deleting a Dynamic Distribution List

To delete Dynamic Distribution List:

$ zmprov ddl allusers@domain.com

Ref:
https://wiki.zimbra.com/wiki/Dynamic_Distribution_lists_in_Zimbra_Collaboration_Server_8.0.x

Comments

Popular posts from this blog

Cambium cnPilot E400/E410/E500 Configuration Tutorial

Disabling Zimbra's AntiSpam, Amavis and AntiVirus filtering

Error "Unable to retrive Zimbra GPG key for package validation"