Migrating mailman lists
Posted by anurag on Wed 28 Nov 2007 at 10:15
A couple of weeks back we had to migrate a few mailman based mailing lists across to a new server. Migration was successful and we had minimum downtime, since no changes were applied to the lists, they were simply moved to a new home. Here is how we did it.
This HowTo assumes that the new server uses Postfix as an MTA. Using any other MTA is not a problem as long as it can read the Mailman generated aliases
Migrating mailman lists is a 3 step process.
2. Preparing New Server.
3. Copying Data to New Server.
- 2.1 Installing Mailman.
Follow the official Mailman installation documentation given at http://www.list.org and make sure new server has python, Apache, and mod_python installed. Mailman's source tarball and distribution supplied packages are equally good. Depending on what you are using, mailman's installation directory would be /usr/local/mailman (in case of source install) or /var/lib/mailman (in case of debian package).
- 2.2 Configure Apache and Postfix.
If your mailing list uses a separate virtual host (highly recommended) then test out if Apache and postfix are correctly configured to serve a sample list.
Copying data involves copying over three directories, which hold list configuration(lists), held messages/bounce stats(data) and list archives(archives).
4. Post Migration checks.
- 3.1 lists
Mailman stores its list specific settings like passwords, subscribers, list settings as python pickels in lists directory. First step in migrating list is to rsync this directory to the new server. You may copy over few selected lists, or all the lists using any means.
For example, to copy all the lists from old server the new server, issue this command on the old server:
# rsync -avz /usr/local/mailman/lists root@new-server:/var/lib/mailman/
Note: Above command will also replace the site wide mailing list named Mailman. So take backups if necessary.
- 3.2 data
The data directory stores all the held messages and bounce events. This directory also contains site wide administrator password and an aliases file which is used by the MTA to identify available mailing lists.
To copy data directory to the new server, issue this command on the old server.
# rsync -avz /usr/local/mailman/data root@new-server:/var/lib/mailman/
Note: Above command will also replace the site wide administrator password file. Backup the existing data directory if required.
- 3.3 archives
The archives directory stores mailing list archives if it is enabled(enabled by default).
To copy list archives, issue this command on the old server.
# rsync -avz /usr/local/mailman/archives root@new-server:/var/lib/mailman/
After the data is migrated, check for any permission issues. Its possible that the new server is configured to run mailman with the user list
. Change the ownership of the directories copied accordingly.
Try to send an email to any of the lists's -request
alias, with `help' in the subject line. Mailman should immediately respond with a list of available commands.
Mailman Homepage - http://www.list.org
Mailman Installation Manual -http://list.org/mailman-install/index.html