Mailman on Ubuntu 8.04

Welcome! In an earlier post, I had mentioned that the university was in the midst of finding a new listserver software and that we had landed on Mailman. This article outlines our setup, taken mainly from the documentation but boiled down to the essentials for me and probably most people.

You could probably install mailman from the apt repos and be just fine, but I chose to do it from source so that I got a deeper understanding of it and to customize certain aspects.

Get some things set up

  1. groupadd mailman
  2. useradd \-c "GNU Mailman \-s /bin/bash \-d /usr/local/mailman \-g mailman mailman
  3. mkdir /usr/local/mailman
  4. cd /usr/local/mailman
  5. chgrp mailman .
  6. chmod a+rw,g+ws .

Next, we're going to configure and build mailman. I'm going to assume you've downloaded the tarball and can extract it's contents to a location that the mailman user has access too (easiest way is to extract as mailman). You should also perform these steps as that mailman user, or at the very least, as a user who is not root but who is a member of the mailman group. When working with subdomains, I've found it is easier to set your \--with-mailhost and \--with-urlhost parameters during build as later you have to muck with virtual domains and such. In our environment we have a subdomain lists.spu.edu. The server is actually called mailman.lists.spu.edu, but we want all URLs and mail stuff to look like lists.spu.edu. That's where these two configure parameters come in. With that said, let's continue.

    Build the software
  1. Go into your extracted software location (the place where you did your tar -zxvf mailman-.tar.gz operation
  2. ./configure \--with-mailhost=lists.spu.edu \--with-urlhost=lists.spu.edu
  3. make && make install
  4. cd /usr/local/mailman
  5. check_perms \-f
  6. become root
  7. cd /usr/local/mailman/archives
  8. chown private \- in Ubuntu the web server user is usually www-data
  9. chmod o-x private
    1. Now, we're going to set up the web server. This was the hardest part for me. I've attached my settings. Essentially you could copy and paste this over the contents of your /etc/apache2/sites-enabled/000-default. I'll leave it at that, you can consult the documentation if you need more.

      It's mail server set up time. I'm going to assume you can get postfix installed (apt-get install postfix if you don't know). During the Ubuntu apt set up, make sure you select Internet Mail. Since, we are piping all of our mail through a border spam scanner, I made sure the mynetworks parameter in /etc/postfix/main.cf only contained our server subnets, I could've locked it down to just the two servers that are delivering mail there.

      There are a ton of settings you can play with located in /usr/local/mailman/Mailman/Defaults.py. You should only make changes in /usr/local/mailman/Mailman/mm_cfg.py. Let's go through the specific steps to get mailman working with postfix.

      Integrating mailman and postfix

    2. add the line MAT='Postfix' to mm_cfg.py
    3. Not as root - cd /usr/local/mailman
    4. bin/genaliases
    5. As root - chown mailman:mailman data/aliases\*
    6. chmod g+w data/aliases\*
    7. add hash:/usr/local/mailman/data/aliases to the alias_maps parameter of /etc/postfix/main.cf
    8. I've also added the following values to the mm_cfg.py file:

      DEFAULT_URL_PATTERN = 'http://%s/lists/'
      MAILMAN_SITE_LIST = 'listserver'
      IMAGE_LOGOS = '/images/'

      That's it for this guide. I've gotten you through step 7 on the documentation. For the rest of it, the documentation will suffice. I'll post another article when I figure out how to backup and restore this setup.

AttachmentSize
mailmApacheConfig.txt1.15 KB