Removing a user from all DLs on a server: Difference between revisions

No edit summary
No edit summary
Line 1: Line 1:
=== <h1>Removing a user from all DLs on a server</h1>===
{{BC|Certified}}
__FORCETOC__
<div class="col-md-12 ibox-content">
 
=Removing a user from all DLs on a server=
 
{{WIP}}
<hr>
<hr>
<br>


<h2>Problem:</h2> Removing a user from all DLs on a server
====Problem====


Removing a user from all DLs on a server


<h2>Solution:</h2>
====Solution====


We can do this using a combination of zmsoap and zmprov<br><br>
We can do this using a combination of zmsoap and zmprov<br><br>
Line 22: Line 28:




Submitted by:  Shashank Tewari
{{Article Footer|ZCS 8.8, 8.7, 8.6|2018-05-21}}

Revision as of 09:08, 21 May 2018

Removing a user from all DLs on a server


Problem

Removing a user from all DLs on a server

Solution

We can do this using a combination of zmsoap and zmprov

1).'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

2).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'.

3).This file is then 'fed' into zmprov, like so, removing the user from all the DLs:

zmprov < /tmp/rdlm.zmprov 


Verified Against: ZCS 8.8, 8.7, 8.6 Date Created: 2018-05-21
Article ID: https://wiki.zimbra.com/index.php?title=Removing_a_user_from_all_DLs_on_a_server Date Modified: 2018-05-21



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 »


Jump to: navigation, search