El 21/2/22 a las 12:28, Paul Paulchen escribió:
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.
I understand you want this:
https://lists.mailman3.org/archives/list/mailman-users@mailman3.org/message/...
Thanks in advance! Paul
Mailman-users mailing list -- mailman-users@mailman3.org To unsubscribe send an email to mailman-users-leave@mailman3.org https://lists.mailman3.org/mailman3/lists/mailman-users.mailman3.org/