Yesterday brought the much anticipated (dreaded) task of moving mailman from one server to another. The move was necessary to retire a FreeBSD server and consolidate services on a Mac OS X 10.4 Server box. There are good documents on the web about setting up mailman on OS X 10.4 Client but not as many on the setup of a standard mailman install on the server platform.
The first question that may jump out at folks is why? Mac OS X 10.4 Server comes with Mailman already installed. Why not use it? The installation included in OS X is highly customized in order to work with Apple's server administration tools. Also in my case I was moving a Mailman 2.1.6 installation on FreeBSD and the OS X Server version is still 2.1.5 (though it has been nearly six months since the release of the security patches in 2.16). Looking at the documentation there is little suggestion changes would have prevented the newer files from working but as a Nevadan I prefer the house's odds to those of the gambler.
In addition to the latest version of Mailman I also like to have Webmin available. It makes taking a look at some of the configuration features of Postfix easier than Apple's native tool. And it doesn't require any install on the client end. You'll likely need developer tools installed on the OS X Server but I can't independently confirm this since they are already installed.
Read more to get the full how-to.
cdto the mailman directory on the old server.
- Create a backup of all the Mailman files you'll need on the new machine.
tar -cvf mmmove.tar ./data ./archives ./lists
- Copy the file mmmove.tar to the new machine
- Create the mailman directory on the new machine. (We'll use /Applications/mailman for this example).
- Download and unpack Mailman in the directory created
- In the terminal change the permissions on the mailman directory
sudo chmod a+rw,g+ws /Applications/mailman
- In the terminal type the following (this assumes Mailman 2.1.6:
sudo ./configure --prefix=/Applications/mailman --with-cgi-gid=www --with-mail-gid=nobody
- Once the lines of text stop scrolling and if the end of them has no errors then type the following:
sudo make install
sudo bin/check_perms -f
sudo bin/check_perms -f
Repeat this last command until it reports no errors. It may continue to show a warning about other users on the computer being able to access the archives which is OK, however if you have multiple users on the system and want to restrict their access follow the instructions in the warning.
- Copy the mmmove.tar file into the /Applications/mailman directory
- In the terminal type the following:
You should see your lists unpack into the proper directories
tar -xvf mmmove.tar
- Make any necessary changes to /Applications/Mailman/mm_cfg.py - Check on Google for suggestions if you're not familiar with these options. The biggest issue is to make sure that your URL and email URL are specified as you want them.
/etc/httpd/httpd_mailman.confand comment replace its contents with the following:
ScriptAlias /mailman/ "/Applications/mailman/cgi-bin/"
Alias /pipermail/ "/Applications/mailman/archives/public/"
Options FollowSymLinks MultiViews Indexes
Allow from all
- Setup the icons for the web server and cron jobs necessary for Mailman by typing the following in the Terminal:
sudo cp /Applications/mailman/icons/* /usr/share/httpd/icons
sudo /Applications/mailman/bin/mmsitepass xxxx
- Fix postfix.cf to use the new mailman aliases file. Change the line that refers to /var/mailman/data/aliases to refer to /Applications/mailman/data/aliases instead. by copying the files over earlier all your Mailman related email aliases should already be in this file
- Setup Mailman to start at boot. In the terminal type:
- Now edit the file /System/Library/LaunchDaemons/mailman.plist and add the following content:
<?xml version="1.0" encoding="UTF-8"?>
- Reboot and test away!