2012-11-07

Mailman: add user to mailing list from command line

Today my colleague and I needed to add a user to one of our mailing lists, but we didn't have immediate access to the Mailman web front-end. So we did it via the command line:
# # NOTE: replace "mylist" with the mailing list's real name
# # Add new user to mailing list:
# echo "email.address@of.new.user" | add_members -r - mylist
# # Verify that new user has been added:
# list_members mylist

See "man add_members" for details. The hyphen after "-r" tells add_members to take email addresses from STDIN.




2 comments:

  1. so now in 2016 i make a question: to remove a member from a list how i can do from command line??
    Thanks

    ReplyDelete
    Replies
    1. Easy, use remove_members. Check its man page for more information, it can be used in different ways.

      Delete