Sorry to take up list space resending this but I caught an error in the Apache configuration section of this (some additional lines needed in Step 4b due to increased security in Apache2 vs. original Apache).
======= In September 2004, I posted on this topic with instructions for installing mailman on the client version of MacOS X 10.3 (Panther). Later, I updated it for OS X 10.4 (Tiger) as well as notes (but not full instructions) for OS X 10.5 (Leopard). Just recently, I did a test installation on my 10.6 (Snow Leopard) laptop in anticipation of a new desktop to become my new server later this year. In all cases, these were the CLIENT version of Mac OS X (Mac OS X Server comes with a bastardized version of Mailman). So here, once again for purposes of getting it in the archives, are my instructions for installing mailman on MacOS X 10.6.x. With this version, I've made some changes to bring the mailman home directory in line with Mailman "standards" (i.e. using /usr/local/mailman instead of /Applications/mailman), improved the system startup procedure, and some other miscellaneous cleanup. ========= Snow Leopard (MacOS X 10.6) installation steps for Mailman This document is based on my experience installing Mailman 2.1.4 on MacOS X 10.3 (Panther) and subsequently upgrading to Tiger (Mac OS X 10.4) and to mailman 2.1.6 and now to Snow Leopard (Mac OS X 10.6) with mailman 2.1.13. It is largely based on Kathleen Webb's document on installing Mailman and Sendmail on MacOS X 10.2 (Jaguar) (<http://mail.python.org/pipermail/mailman-users/2002-October/022944.html>) which contains some information on tools that can be useful that will not be repeated here. This guide assumes that you have Postfix (which comes with Snow Leopard) already configured and operating, that you have the built-in web server running (if not, enable it by going to the Sharing pane of System Preferences and turning on Web Sharing), and that you are familiar with the Unix shell and basic text editing from the shell (vi or emacs). It is intended to help you get Mailman installed. It does not deal with actually using Mailman as there are plenty of other sources of help for that. This is based on a new install on a Snow Leopard system that has never had Mailman on it before. Questions are best asked through the mailman-users mailing list. ======================================== Step 1) Collect all the things you need. a) You need to download and decompress the Mailman software. (The installation instructions are in step 3.) Download the software from: http://www.list.org/ Download the latest 2.1.x.tgz which is a gzip compressed tar file (.tgz). Just leave it for now and we'll expand it later. b) You need to be an administrator of your computer. If you do not have administrator privileges, you will not be able to do this. c) Python comes pre-installed on your computer. It is already functioning and ready for use by Mailman. (To verify you have Python, open the Terminal application. at the % prompt, type: sudo Python -V and then hit the enter/return key. You'll be prompted for your password. When you enter it, the terminal will respond with the Python version. d) Apache web server software comes pre-installed on your computer and has already been configured and is running. e) Postfix is already installed on your computer but is not running by default. You will need to get Postfix configured and started but how to do that is beyond the scope of this document. An excellent way of getting Postfix up and running, along with a POP and IMAP server, is with MailServe Snow <http://www.cutedgesystems.com/software/MailServeSnow/>. Note that MailServe Snow is not free - as all the underlying software is freely available, you're paying for the configuration and installation tool, not the underlying software. f) You may need to know how to get into hidden subdirectories. In the Finder, use the Go menu and choose Go to Folder. Type in the path to the hidden folder you need to open. g) You may need to know how to make a new user. You use the System Preferences application [from the Apple menu]. Use the Accounts panel in the System section. h) You need to install the Developer Tools that came with your Snow Leopard disks or several of the steps won't work. ======================================== >From this point on, we will do everything in Terminal and as root. So open Terminal and then become root by typing 'sudo su'. You will be prompted for your password and then get a # as a prompt. Step 2) Verify the user and group needed to run Mailman. All versions of OS X since at least Panther have come with the needed users and groups already created. We will be using _mailman for mailman and _www for the webserver. To verify they're there, type 'grep _mailman /etc/group' and 'grep _mailman /etc/passwd. Both should return one line starting with _mailman:*:78:. If they do, they exist. You can repeat that with _www and the number you see should be 70. Assuming all of the above is there, we're good to go. ======================================== Step 3) Create a folder for mailman in the finder. a) You can choose where to create the folder. I chose to follow the Mailman "standard" and put it in /usr/local. These instructions assume that is where you create the new folder. To create the folder, type: mkdir -p /usr/local/mailman Then "change directory" to it: cd /usr/local/mailman b) Copy the downloaded compressed tar file (e.g. mailman-2.1.13.tgz) to the directory we just created and then uncompress and untar it. The command below assumes that compressed tar file was downloaded into your Downloads folder. cp ~/Downloads/mailman-2.1.13.tgz . (yes, that's a space and a dot on the end of the command) tar xvzf mailman-2.1.13.tgz c) Set the proper ownership and permissions on the mailman directory: chown _mailman:_mailman /usr/local/mailman chmod a+rw,g+ws /usr/local/mailman d) Change directory in to the Mailman source directory. Assuming the you are using the mailman-2.1.13 version, type: cd /usr/local/mailman/mailman-2.1.13 e) Build Mailman: ./configure --prefix=/usr/local/mailman --with-cgi-gid=_www --with-mail-gid=_mailman f) A whole bunch of lines of code will scroll through the Terminal window. When it finishes, in the Terminal window, type: make install cd /usr/local/mailman sudo bin/check_perms -f sudo bin/check_perms -f (Repeat the check_perms until no errors are reported. If you end up with problems later, this whole step is probably where the problem will come from. Permissions are important to Mailman.) g) Set the Mailman site password: /usr/local/mailman/bin/mmsitepass xxxx [Replace xxxx with the password you want to use as the master password to the mailman application.] ======================================== Step 4) Set up your web server to serve the Mailman web pages for subscribing and administrating the mailing list. a) Change directory to the apache2 configuration directory (Apache2 is the webserver): cd /etc/apache2/ b) Edit httpd.conf with your favorite Terminal text editor such as vi or emacs). For instance, for vi, type: vi httpd.conf Add these lines to the file: ScriptAlias /mailman/ /usr/local/mailman/cgi-bin/ Alias /pipermail/ /usr/local/mailman/archives/public/ <Directory "/usr/local/mailman/cgi-bin"> order allow,deny allow from all </Directory> <Directory "/usr/local/mailman/archives/public"> order allow,deny allow from all </Directory> <Directory "/usr/local/mailman/archives/public"> Options FollowSymLinks </Directory> c) Save the file and exit the editor. d) Copy the images used for the mailman web pages to where Apache expects them. In Terminal: cp /usr/local/mailman/icons/* /usr/share/httpd/icons e) Next we need to add the cron jobs that mailman needs to any existing root cron jobs. If there are no existing root cron jobs, you can just do: crontab /usr/local/mailman/cron/crontab.in However, if there are existing root cron jobs, then we need to append to it. One way way to do that is: crontab l | cat - /usr/local/mailman/crontab.in | crontab (note that this outputs the existing cron jobs, concatenated the mailman jobs to it, and the saves it as a new crontab. Make sure you have the command right or you risk losing your old jobs. You might want to backup the old jobs first with 'crontab -l > crontab.backup'). You can then edit the crontab with 'crontab -e'. You may want to comment out the gate news to mail job if you aren't doing that. ======================================== Step 5) Configure Postfix to support a separate Mailman alias file. a) Edit your Postix configuration file (possibly /etc/postfix/main.cf or if you used MailServe Snow as I mentioned above, then it's /usr/local/cutedge/postfix/etc/main.cf - you can also do this through the MailServe Snow application and add this as a custom Postfix setting) and add: alias_maps=hash:/etc/postfix/aliases, hash:/usr/local/mailman/data/aliases b) Reload postfix with: postfix reload ======================================== Step 6) Configure Mailman a) We need to let Mailman know we're using Postfix. Using you favorite means of text editing, open /usr/local/mailman/Mailman/mm_cfg.py and add below the line that says "# Put YOUR site-specific settings below this line.": MTA = "Postfix" ======================================== Step 7) Create your site-wide mailing list (mailman). Read the instructions in INSTALL in your mailman source directory (/Applications/Mailman/Mailman-2.1.13). In short, in the Terminal application, type: cd /usr/local/mailman bin/newlist mailman bin/config_list -i data/sitelist.cfg mailman ======================================== Step 8) Configure your system to start Mailman when it is booted. This has been a little tricky since Leopard came out so rather than have launchd start Mailman directly, we will have it run a script we put in root's home directory that does it a way I've found more reliable (by waiting one second after issuing the command to start mailman before it exits): a) In Terminal, change directory to /var/root/: cd /var/root b) Using your favorite text editor (vi, emacs, or whatever), create the file start_mailman.sh. For instance, with vi, type: vi mailman_start.sh And enter the lines: #!/bin/sh /usr/local/mailman/bin/mailmanctl -s start sleep 1 Save and exit. c) Change permissions to make it executable: chmod 755 start_mailman.sh d) Create the Mailman startup preference file: cd /Library/LaunchDaemons touch mailman.plist c) Using your favorite method of text editing, add the following content to mailman.plist: <?xml version="1.0" encoding="UTF-8"?> <plist version="1.0"> <dict> <key>Disabled</key> <false/> <key>Label</key> <string>mailman</string> <key>OnDemand</key> <true/> <key>ProgramArguments</key> <array> <string>/var/root/start_mailman.sh</string> </array> <key>ServiceIPC</key> <false/> <key>RunAtLoad</key> <true/> </dict> </plist> d) Verify the file ownership and permissions: ls -l You should see one of the lines saying something like: -rw-r--r-- 5 root wheel 170 12 May 11:21 mailman.plist e) If the permissions (rw-r--r--) are not correct, type: chmod 644 mailman.plist f) If the owner (root) or group (wheel) is not correct, type: chown root:wheel mailman.plist g) Go into launchctl and enable Mailman. This should also cause it to start immediately. launchctl load -w mailman.plist (the -w is very important. The Disabled attribute in the .plist is no longer used. Instead, Disabled status for all launchd plists is stored in /var/db/laubchd.db/com.apple.launchd/overrides.plist and is set/unset by the -w on the launchctl load/unload commands. Yes, it does seems needlessly complicated). Mailman should have started. To verify, open Terminal and type: ps -efw | grep python You should see a bunch of lines like this: 78 1099 1 0 0:00.01 ?? 0:00.01 /usr/bin/python /usr/local/mailman/bin/mailmanctl -s start 78 1101 1099 0 0:08.38 ?? 0:18.67 /usr/bin/python /usr/local/mailman/bin/qrunner --runner=ArchRunner:0:1 -s 78 1102 1099 0 0:07.29 ?? 0:17.57 /usr/bin/python /usr/local/mailman/bin/qrunner --runner=BounceRunner:0:1 -s 78 1103 1099 0 0:08.46 ?? 0:18.83 /usr/bin/python /usr/local/mailman/bin/qrunner --runner=CommandRunner:0:1 -s 78 1104 1099 0 0:08.14 ?? 0:18.16 /usr/bin/python /usr/local/mailman/bin/qrunner --runner=IncomingRunner:0:1 -s 78 1105 1099 0 0:07.92 ?? 0:17.73 /usr/bin/python /usr/local/mailman/bin/qrunner --runner=NewsRunner:0:1 -s 78 1107 1099 0 0:07.72 ?? 0:18.54 /usr/bin/python /usr/local/mailman/bin/qrunner --runner=OutgoingRunner:0:1 -s 78 1108 1099 0 0:07.80 ?? 0:17.66 /usr/bin/python /usr/local/mailman/bin/qrunner --runner=VirginRunner:0:1 -s 78 1109 1099 0 0:00.07 ?? 0:00.19 /usr/bin/python /usr/local/mailman/bin/qrunner --runner=RetryRunner:0:1 -s 0 15583 15537 0 0:00.00 ttys000 0:00.00 grep pyth (The numbers will vary. The important thing is that you see the qrunner processes.) ======================================== Step 9) Enjoy! At this point, mailman should be ready to use. Read the documentation in your source directory for instructions on setting up your mailing lists. -- Larry Stone lston...@stonejongleux.com http://www.stonejongleux.com/ ------------------------------------------------------ Mailman-Users mailing list Mailman-Users@python.org http://mail.python.org/mailman/listinfo/mailman-users Mailman FAQ: http://wiki.list.org/x/AgA3 Security Policy: http://wiki.list.org/x/QIA9 Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/ Unsubscribe: http://mail.python.org/mailman/options/mailman-users/lstone19%40stonejongleu x.com ------------------------------------------------------ Mailman-Users mailing list Mailman-Users@python.org http://mail.python.org/mailman/listinfo/mailman-users Mailman FAQ: http://wiki.list.org/x/AgA3 Security Policy: http://wiki.list.org/x/QIA9 Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/ Unsubscribe: http://mail.python.org/mailman/options/mailman-users/archive%40jab.org