October 2nd, 2010
We have been using XServes as our primary mail servers at my organization for about two years now, we upgraded from an older Linux system and we could not be happier, since moving over to the 10.6 platform, we have enjoyed almost no email downtime, very easy to manage mail system and of course all the goodies that you would expect to run, some of which I have already mentioned (Squirrelmail) and also Mailman. Through my time configuring the server, migrating data and through other requests I have compiled a list of a few tips and tricks for working with Mailman on the OSX platform.
1. Migrating Mailman data from one server to another.
I had many problems making sure that mailing lists, users, and archives were preserved when moving from our old server to our new server. Here are the following things you must do in order to ensure that the lists are preserved.
You must backup the old mailman lists these are more than likely stored in the /var/mailman directory
sudo cp -Rp /var/mailman /Volumes/setting-backups/
Once your ready to restore the files to the new server run
sudo cp -Rp /Volumes/setting-backups/mailman /var
the -Rp flags relate to the fact that it is a folder and that you are going to restore the permissions, once your done you will need to login through SSH or on the server itself and run
cd /usr/share/mailman/bin sudo ./genaliases
the ./genaliases command will take the lists, and it will generate aliases for them. This plagued me for a while before I realized that when you migrate to the server, this database needs to be built.
2. Change the hostname of of your Mailman Server
I have had to do this as well, normally the mailman web interface can be found at http://example.com/mailman/admin for the administrative side or http://example.com/mailman/listinfo for the list information side. If you are going to change the hostname of your server to example2.com then you will need to use the command line tools to move the lists over.
cd /usr/share/mailman/bin ./withlist -l -r fix_url $listname -v
This will update the host names for $listname from the main configuration file, and -v shows you what the changes are. Remember to change $listname with the actual name of your list, you will have to do this for every list you can however run all of the lists at once by running the command multiple times like so.
cd /usr/share/mailman/bin ./withlist -l -r fix_url $listname -v ./withlist -l -r fix_url $listname1 -v ./withlist -l -r fix_url $listname2 -v ./withlist -l -r fix_url $listname3 -v
3. Retrieving a text list of users subscribed to a list
I have seen this question asked in almost every forum that I have visited, there are multiple ways to do this however I recently found out that Mailman has a built in tool that will automatically grant you what your looking for in the form of an email daemon. First, you must be an administrator or moderator of the list in question. Second you must know the password to the administration area for the list in question.