Many thanks for your reply. Sorry for replying late as I was on vacation.
Here is the snippet of code I use. I originally want to test whether a non-member is already a member before subscribing. However, if he/she is not, the python script exit due to HTTP error. If I comment out the code, then there is error when it try to add the non-member as member. Concerning the moderation_action and delivery_status, thanks for showing me the allowed values. I have corrected that part.
One more question, can we remove the non-members? I am actually referring to the Example Usage doc (http://docs.mailman3.org/projects/mailmanclient/en/latest/src/mailmanclient/...)
Snippet of code: print ("\nNon-members:") for nonmember in my_list.nonmembers: print ("%s: role=%s moderation_action=%s" % (nonmember, nonmember.role, nonmember.moderation_action)) print ("Converting nonmember to member.....") importedmember = my_list.get_member(nonmember.email) if (importedmember): print ("Already imported " + nonmember.email) else: imported = my_list.subscribe(nonmember.email, 'Import from nonmember', pre_verified=True, pre_confirmed=True, pre_approved=True) importedmember = my_list.get_member(nonmember.email) importedmember.save() print ("Importing " + nonmember.email) importedmember.moderation_action = 'accept' importedmember.save() prefs = importedmember.preferences prefs['delivery_status'] = 'by_user' prefs.save()