Hi community,
I was wondering if there is a walk-through for the following issue - or is it even an issue? We got plenty lists with a lot of users come and go from time to time.
Thanks to the thread, I understood how to pick on adress and delete them via the mailman shell; https://lists.mailman3.org/archives/list/mailman-users@mailman3.org/thread/K...
um = getUtility(IUserManager) usr = um.get_user('user@example.com') um.delete_user(usr) commit()
Thanks to this thread, I know how to find the lost souls in our mailman environment https://lists.mailman3.org/archives/list/mailman-users@mailman3.org/thread/R...
um = getUtility(IUserManager) for usr in um.users: ... if len(list(usr.memberships.members)) > 0: ... continue ... adr = usr.addresses[0] ... print(f'Name: {adr.display_name}, Email: {adr.email}, Created: {usr.created_on}')
So I can see them now. Is there a technique, to clean them up? To get rid of them out of the system? I am not a python programmer, but I guess there is a way to use, instead of a single user, a list of users in the delete command of the mailman shell?
e.g. (sorry if this example leads to any pain for any coder/ programmer)
user1@example.com user2@example.com user3@example.com
um = getUtility(IUserManager) usr = um.get_user('user1@example.com','user2@example.com','user3@example.com') um.delete_user(usr) commit()
Hope I made my intention clear. I want to get rid of the users who don't belong/ or are subscribe to a list anymore.
Thanks in advance! Paul