Skip to content
Snippets Groups Projects
Commit 10359af1 authored by Conrad Holmberg's avatar Conrad Holmberg
Browse files
parents d271ae3a a4c49dad
No related branches found
No related tags found
No related merge requests found
......@@ -27,24 +27,3 @@ dump/restore site
-----------------
there's no function to dump/restore site settings for Mailman
Operations
==========
manage held messages
--------------------
we need to be able to list, and operate on held messages from CLI:
* list
* approve
* reject
manage subscriptions
--------------------
we need an ability for self-subscribed lists to clean up subscription queue:
* list
* approve
* reject
......@@ -23,7 +23,7 @@ def get_ml(args):
return (client, ml)
def held_list(args):
def held_list2(args):
client, ml = get_ml(args)
held_data = []
for held in ml.held:
......@@ -40,6 +40,26 @@ def held_list(args):
print json.dumps(held_data, indent=2)
def held_list(args):
client, ml = get_ml(args)
held_data = []
page = ml.get_held_page(count=100)
while len(page) > 0:
for held in page:
if args.fields:
data_hash = {}
for f in args.fields:
data_hash[f] = held.rest_data[f]
held_data.append(data_hash)
else:
held_data.append(held.rest_data)
if not args.detailed:
del held_data[-1]['msg']
page = page.next
print json.dumps(held_data, indent=2)
def held_approve(args):
client, ml = get_ml(args)
results = []
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment