Mailman: how to set moderated flag on for all

Mailman  is an old and well known free software for managing electronic mail discussion and e-newsletter lists.
Recently i had to put as active the “moderated” flag for all the people in a very big mailing list.
To do this, first I loaded this python script, then I exported all the list members into a file

/usr/lib/mailman/bin/list_members mylistname  > /tmp/mylistnameusers.txt

and finally I applied the withlist command for all:

for ADDR in $(cat /tmp/mylistnameusers.txt) ; do
/usr/lib/mailman/bin/withlist -l -r du.setMemberModeratedFlag mylistname  $ADDR 0
done

Tags:

Leave a Reply