Before read any further, make sure that you have administrator privileges for system-wide operations. Because you need to have access to the Mailman installation to perform the operations which I’m gonna tell you shortly. If you don’t have this access, you need to create a new list and configure like the old one. Hm.. think of a mailing list with a few hundred users and hell a lot of configuration
If you have access to the command line tools, you can simplify the whole process by doing the following after creating the new list:
[root]# cd <mailman_installation> ; usually at /var/lib/mailman [root]# bin/config_list -o file oldlist [root]# bin/config_list -i file newlist [root]# bin/list_members -o digest_file -p -d -f oldlist [root]# bin/list_members -o regular_file -p -r -f oldlist [root]# bin/add_members -d digest_file -r regular_file [other options] newlist
Use the –help options on the above commands for more information.
The drawback of the above methods is member information other than name and regular/digest is not transferred and the archives are not transferred. The following procedure will preserve everything. Before doing this, consider whether you want to stop your incoming MTA during the process to prevent possible message loss.
[root]# mv lists/oldlist lists/newlist [root]# mv archives/private/oldlist archives/private/newlist [root]# mv archives/private/oldlist.mbox archives/private/newlist.mbox [root]# mv archives/private/newlist.mbox/oldlist.mbox archives/private/newlist.mbox/newlist.mbox
Then go to the web admin interface for the ‘newlist’ list and change the real_name from ‘OldList’ to ‘NewList’.
You might be tempted to change the names of any data/heldmsg-oldlist-nnn.pck (or .txt) files. Don’t do this. The old names are in the lists request.pck files, and changing the name will result in the file not being found.
Also, don’t be too concerned about symlinks in the archives/public/ directory. Mailman will automatically create them as needed for the new name. If you leave the old symlinks, they will point to non-existant directories, and trying to visit old public archive URLs will probably give a 403 – forbidden error, so removing them is a good idea, but then visiting the old URLs will still produce a 404 – not found error.
At this point, everything is OK except the ‘more information about this list’ links on some archive pages will still point to the ‘oldlist’ list which doesn’t exist. You can fix those manually or rebuild the archive with:
[root]# bin/arch --wipe newlist
Finally, if your MTA uses aliases for mailman lists rather than some process that automatically understands list names from the contents of the lists/ directory, you will have to update your aliases. If you do this manually, edit your aliases to change ‘oldlist’ to ‘newlist’ (a total of 2 changes per alias for 10 aliases), and then run ‘newaliases’ or whatever command rebuilds your alias database. It you have Postfix/Mailman integration, just run bin/genaliases.
Depending upon your version of Mailman, you may find that after performing the second type of renaming procedure, above, that when you log into the admin screen for ‘NewList,’ the list name in the first box still shows ‘OldList’ and needs changing to ‘NewList.’ Upon trying to submit that change, you may be presented with:
Error: real_name attribute not changed! It must differ from the list’s name by case only.
In that case, use the following commands to change the real_name:
[root]# bin/withlist -l newname Loading list newname (locked) The variable `m' is the newname MailList instance >>> m.real_name 'OldName' >>> m.real_name = 'NewName' >>> m.Save() >>> Unlocking (but not saving) list: newname Finalizing
You type the withlist command, and within withlist, you type the responses to the >>> prompts. On the >>> last line, your entry is control-D (end of file). This procedure was found in the archives of the Mailman-Users mailing list:
http://www.mail-archive.com/mailman-users@python.org/msg50278.html
Enjoy!
Special Thanks to: David Topping and Mark Sapiro