I had trouble searching for a good way to remove all members from a distribution list via command line. Deleting the DL and recreating it results in losing any special properties the DL might have had (such as recursive membership in another DL). "zmprov rdlm" appears to only take a single address and takes several seconds to complete, so looping it takes a very long time for lists with hundreds of members.
I figured out a way to do this with a single zmprov command and wanted to share it here in case anyone else searches for this functionality in the future.
Code: Select all
zmprov mdl list@example.com zimbraMailForwardingAddress ""