Avoiding welcome message when subscribing using REST API
In Mailman 2 the site admin could add a member to a list using the -wn parameter of add_members to avoid sending a welcome message.
On the host (outside the docker container) I've made an updater using the REST API to keep certain lists updated with imported addresses from one of our other systems, though respecting opt ins and opt outs. Similar to Mailman 2 I would like to avoid the welcome message to those automatic updated members, even the list is configred to send welcome message to those opting in by will, and I also like to avoid forcing the list owner/moderator to approve all new members automatically updated even the list is set for moderation of new members opting in by will.
What is the payload for "no welcome message"?
def add_new_members(listname_fqdn, members): [SNIP] for member in newmembers: payload['list_id'] = listname_fqdn.replace('@', '.') payload['subscriber'] = member payload['pre_verified'] = True payload['pre_confirmed'] = True payload['pre_approved'] = True
response = mmapipost('members', payload)
def mmapipost(apicommand,payload):
response = requests.post('http://172.19.199.2:8001/%s/%s' % (restapiversion, apicommand), data=payload,
auth=('restadmin', 'restpass'))
Maybe I should rephrase. Is there any way to suppress the welcome message when using REST API to subscribe, like add_members -wn
in Mailman 2.1? And if so, how?
Maybe I should rephrase. Is there any way to suppress the welcome message when using REST API to subscribe, like
add_members -wn
in Mailman 2.1? And if so, how?
Currently not. Here are open issues regarding this
participants (2)
-
Henrik Rasmussen
-
Simon Hanna