Blog Entries

May 2013
M T W T F S S
« Mar    
 12345
6789101112
13141516171819
20212223242526
2728293031  

Integrating Mailman With Kolab

And now for something completely different…

Kolab is a groupware server cleverly composed as a lightweight integration of existing technologies… Cyrus, Postfix, OpenLDAP, Apache… Whlist, “out of the box”, Kolab is a excellent solution, there is one commonly-sought feature which does not come as part of the standard distribution… mailing list support by Mailman.

Getting Mailman to play fair with the other components of Kolab is easy when you know how. But the current documentation on the Kolab wiki is out of date. So before I update that, I am publishing the details here to provide a wide audience to the material.

  1. Install Kolab
  2. Follow the instructions on the Kolab website for installing Kolab from source

  3. Grab the Mailman sources
    • wget http://ftp.gnu.org/gnu/mailman/mailman-2.1.13.tgz
    • tar zxf mailman-2.1.13.tgz
    • cd mailman-2.1.13
  4. Build and install mailman
    • ./configure --with-username=list --with-groupname=list --with-mail-gid=kolab-n --without-permcheck --prefix=/kolab/usr/mailman --with-var-prefix=/kolab/var/mailman --with-cgi-gid=kolab-n
    • make && sudo make install

    The configure step is particularly important because it is at this stage that we configure mailman to run as a particular user. This user must be compatible with the rest of the Kolab setup.

  5. Configure Mailman
    • Create /kolab/etc/kolab/templates/mm_cfg.py.template
    • Paste in the following:
      KOLAB_META_START
      TARGET=/kolab/usr/mailman/Mailman/mm_cfg.py
      PERMISSIONS=0640
      OWNERSHIP=root:list
      KOLAB_META_END

      from Defaults import *
      MTA = ‘Postfix’
      POSTFIX_ALIAS_CMD = ‘/kolab/sbin/postalias’
      POSTFIX_MAP_CMD = ‘/kolab/sbin/postmap’
      DELIVERY_MODULE = ‘SMTPDirect’
      SMTPHOST = ‘localhost’
      DEFAULT_URL_PATTERN = ‘http://%s/mailman/’
      DEFAULT_URL = ‘http://@@@fqhostname@@@/mailman/’
      DEFAULT_URL_HOST = ‘@@@fqhostname@@@’
      DEFAULT_EMAIL_HOST = ‘@@@postfix-mydomain@@@’
      DEFAULT_NNTP_HOST = ‘@@@fqhostname@@@’
      add_virtualhost(‘@@@fqhostname@@@’)
      add_virtualhost(‘@@@postfix-mydomain@@@’)

      The first 5 lines of this configuration are actually instructions to the Kolab template engine. Anything contained in @@@ is going to be replaced by the template engine with details you provided at the time Kolab was installed.

    • Run /kolab/sbin/kolabconf to process the configuration template
  6. Configure Apache
    • Add the following to /kolab/etc/kolab/templates/httpd.local.template
    • ScriptAlias /mailman/ “/kolab/usr/mailman/cgi-bin/”

      <Directory “/kolab/usr/mailman/cgi-bin/”>
      AllowOverride None
      Options ExecCGI
      AddHandler cgi-script .cgi
      Order allow,deny
      Allow from all
      </Directory>

      Alias /pipermail/ “/kolab/var/mailman/archives/public/”
      Alias /archives/ “/kolab/var/mailman/archives/public/”

      <Directory “/kolab/var/mailman/archives/public/”>
      Options Indexes FollowSymlinks
      AllowOverride None
      Order allow,deny
      Allow from all
      AddDefaultCharset off
      </Directory>

  7. Edit /etc/group and add the kolab-n user to the postfix group
  8. This is important! Apache runs as the koab-n user and this step is required so that postalias can be called from the Mailman CGI scripts. If you do not do this you would will get some evil looking permissions error.

  9. Restart Apache
    • sudo /kolab/bin/openpkg rc apache restart
  10. Prepare Mailman
    • sudo /kolab/usr/mailman/bin/mmsitepass
    • sudo /kolab/usr/mailman/bin/newlist mailman
  11. The first of these commands allows you to set the Mailman site administrator’s password which is required for certain tasks, such as creating new lists. The second commands creates the mailman mailing list which is required as part of the Mailman deployment.

  12. Start Mailman
    • sudo /kolab/usr/mailman/bin/mailmanctl start

OK, that’s it. You can now access Mailman from the command prompt using the scripts in /kolab/usr/mailman/bin or through the web interface at http://your-server/mailman/. Archives can be found at http://your-server/archives/. New lists will properly work with the Kolab Postfix installation.

This setup is known to work on Ubuntu Karmic using Kolab 2.2.3 and Mailman 2.1.13.

Be Sociable, Share!

2 comments to Integrating Mailman With Kolab

  • Hmmmmm, does the FSFE use Kolab internally and:
    if true: does it offer to local FSFE groups
    if not: why?

    • Paul Adams

      I do not know if the FSFE uses Kolab internally. They should!

      I suspect they do not offer it to other groups… If you offer a public email service, you have to open up your servers to government scrutiny and that would cause a lot of problems for the FSFE.