On 8/6/21 9:18 AM, Guillermo Hernandez (Oldno7) via Mailman-users wrote:
Hi all:
I need to remove all non members from a list. I know I can do it via Postorius, but it has to be done one at a time. (you can delete ALL suscribers but not all non members...)
Anyone has a python recipe to do this?
$ /opt/mailman/mm/bin/mailman shell -l list.example.com Welcome to the GNU Mailman shell Use commit() to commit changes. Use abort() to discard changes since the last commit. Exit with ctrl+D does an implicit commit() but exit() does not. The variable 'm' is the list.example.com mailing list
for nonmember in m.members.nonmembers: ... nonmember.unsubscribe() ... commit()
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan