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.
- Install Kolab
- Grab the Mailman sources
tar zxf mailman-2.1.13.tgz
- 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.
- Configure Mailman
- Create /kolab/etc/kolab/templates/mm_cfg.py.template
- Paste in the following:
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@@@’
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.
/kolab/sbin/kolabconfto process the configuration template
- Configure Apache
- Add the following to /kolab/etc/kolab/templates/httpd.local.template
ScriptAlias /mailman/ “/kolab/usr/mailman/cgi-bin/”
AddHandler cgi-script .cgi
Allow from all
Alias /pipermail/ “/kolab/var/mailman/archives/public/”
Alias /archives/ “/kolab/var/mailman/archives/public/”
Options Indexes FollowSymlinks
Allow from all
/etc/groupand add the kolab-n user to the postfix group
- Restart Apache
sudo /kolab/bin/openpkg rc apache restart
- Prepare Mailman
sudo /kolab/usr/mailman/bin/newlist mailman
- Start Mailman
sudo /kolab/usr/mailman/bin/mailmanctl start
Follow the instructions on the Kolab website for installing Kolab from source
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.
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.
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.