Unsubscribing from a list using command
Hi
Can I have inputs on how to unsubscribe a member from a list from command line..?
-- Regards Sandeep Kumar
On Mon, Aug 5, 2019, at 3:24 AM, sandeep kumar wrote:
Hi
Can I have inputs on how to unsubscribe a member from a list from command line..?
There isn't a command right now to do that, but you can do so using the REST API:
$ curl --user restadmin:restpass http://localhost:8001/3.1/members/find\?subscriber\=foo@gmail.com\&list_id\=list.example.com
This should get you the member resource and pick out the "member_id" from there and then
$ curl --user restadmin:restpass -X DELETE http://localhost:9001/3.0/members/<member_id>
Make sure that you replace the address of subscriber with foo@gmail.com and mailing list id with list.example.com (posting address of list@example.com becomes list.example.com).
Also, make sure you change the username and password for your rest api (restadmin:restpass) are the defaults.
There is a pending merge request which adds support for removing members from commandline though1. Perhaps, the next version of Mailman will have the support.
-- Regards Sandeep Kumar
Mailman-Developers mailing list -- mailman-developers@python.org To unsubscribe send an email to mailman-developers-leave@python.org https://mail.python.org/mailman3/lists/mailman-developers.python.org/ Mailman FAQ: https://wiki.list.org/x/AgA3
Security Policy: https://wiki.list.org/x/QIA9
-- thanks, Abhilash Raj (maxking)
participants (2)
-
Abhilash Raj
-
sandeep kumar