The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.
- Zimbra Tech Center
- Certified
- Removing a user from all DLs on a server
Removing a user from all DLs on a server
KB 23319
|
Last updated on 2018-05-21
|
Last updated by Shanxt
|
|
Verified in: ZCS 8.8
ZCS 8.7
ZCS 8.6
ZCS 8.5
|
|
- This is certified documentation and is protected for editing by Zimbra Employees & Moderators only.
|
KB 23319
|
Last updated on 2018-05-21
|
|
|
- This is certified documentation and is protected for editing by Zimbra Employees & Moderators only.
|
Problem
Removing a user from all DLs on a server
Solution
We can do this using a combination of zmsoap and zmprov
- 'zmsoap' will get a list of all the distribution lists the user is a member of. So for 'user@example.com':
zmsoap -z GetAccountMembershipRequest/account=user@example.com @by=name
- Use this to make a 'zmprov' script that will run 'zmprov rdlm dl@example.com user@example.com' for all the DLs:
zmsoap -z GetAccountMembershipRequest/account=user@example.com @by=name | sed -n 's/.*name="\(.[^"]*\)".*/rdlm \1 user@example.com/p' > /tmp/rdlm.zmprov
The above creates a file '/tmp/rdlm.zmprov', which contains multiple lines in the form of 'rdlm dl@example.com user@example.com'.
- This file is then inputted to zmprov, removing the user from all the DLs:
zmprov < /tmp/rdlm.zmprov
Try Zimbra
Try Zimbra Collaboration with a 60-day free trial.
Get it now »
Want to get involved?
You can contribute in the Community, Wiki, Code, or development of Zimlets.
Find out more. »
Looking for a Video?
Visit our YouTube channel to get the latest webinars, technology news, product overviews, and so much more.
Go to the YouTube channel »