Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have some internal mailman mailing lists on my intranet. The company domain name has changed.

Can I automate the process of resigning '' and assigning '' from/to the list?

I have 11 lists, the busiest one has 17 members. So, not huge, but a huge pain to deal with manually.

share|improve this question
up vote 1 down vote accepted

Mailman has many commands to dump information and manipulate the lists. These are the commands that should be relevant if you are asking how to change the subscribed addresses of users from one domain to another.

  • list_lists - display all the lists
  • list_members - display the members of a list, can be redirected to a text file.
  • add_members - add members to a list, can take a file as input
  • remove_members - remove members from a list

Given those commands you should probably be able run through a simple process described by this psuedo shell code. You'll obviously want to clean this up to actually work and test it first. I don't have a system available at the moment I can test on.

for each list in `list_lists`
  # add members with new addresses
  add_members --welcome-msg=n --admin-notify=n \
   --file <(list_members {listname} | grep '' | sed -e 's/') {listname} 
  # remove old addresses
  remove_members --file=<(list_members {listname} | grep '') {listname}
share|improve this answer
Thanks - I need to find some time to re-visit this which won't be for a day or 2 now. Hopefully I'll be able to accept your answer then :-) – dr-jan Aug 9 '11 at 17:39

Using Zoredache's excellent suggestions, I ended up processing each list in 3 stages, one for regular members and one for digest members, then a final pass to remove the old addresses. So, for each list I did this:

PATH=$PATH:/usr/lib/mailman/bin; export PATH

list_members --regular list_name | grep '' | sed -e 's/old_domain/new_domain/' | add_members --welcome-msg=n --admin-notify=n --regular-members-file=- list_name
list_members --digest  list_name | grep '' | sed -e 's/old_domain/new_domain/' | add_members --welcome-msg=n --admin-notify=n --digest-members-file=- list_name
list_members list_name | grep '' | remove_members --file=- --nouserack --noadminack list_name

The PATH statement is needed because the mailman binaries are in an uncommon directory (/usr/lib/mailman/bin on my Fedora system).

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.