Project

General

Profile

Actions

Be sure to have read the Technical summary of colibri before reading this page.

General notes about installing colibri

Prerequisites

  • a mail server that accepts mail sent to the mailing lists handled by colibri
  • mhonarc somewhere in the PATH where the colibri daemon can find it.
  • a place on the filesystem where Colibri can read and write files, to handle spools and archives. The MTA needs to be able to write to a subdirectory of this spool.
  • a way to send email : typically the IP+port of an email server that will accept mails from the server colibrid runs on.
If you want to use the web frontend (you are highly encouraged to!)
  • a web server that can
    • execute python code
    • access to the same database as the daemon, and
    • access to the same filesystem with archives, bounced/rejected emails, etc.

Configuration

There are several places where colibri can read its configuration:

The file colibrisettings.py, at the top of the source directory, contains configuration about the spool directory position and layout, and configuration about log files.

The files settings.py and local_settings.py are configuration files for Django and handle stuff like database, email host/port to send emails, installation path, web urls, language settings and much more. The file settings.py contains default settings, and you should not modify it : overwrite the settings you want from the file local_settings.py. A file local_settings.py.example is provided as an example.

Variables in the init.d script decide if/where the PID should be written (recommended) and where the colibri software is installed.

Initialize the database

This is no more different than any Django website, and you can check the (great) django documentation

If you've done the previous step carefully , you should have configured the database (mysql, sqlite3, postgresql) and db settings (host, name, password..). Initializing the database should be no more complicated than running

./manage.py  syncdb

from the main directory of colibri.

Detailed example using Postfix, Nginx, gunicorn, and Gentoo

I have a dedicated unix user called colibri
The rw directory for colibri is /var/spool/colibri/

Postfix configuration

In /etc/postfix/main.cf, i have

default_privs = colibri

so that when postfix writes files in the colibri spool directory, it changes the ownership of files to the user colibri.

In the alias file (/etc/mail/aliases in gentoo+postfix) I include rules so that mails that should be handled by colibri are put by postfix inside the colibri spool directory. Typically :

# ------------------- colibri-test@freehackers.org
colibri-test: /var/spool/colibri/
colibri-test-request: /var/spool/colibri/
colibri-test-editor: /var/spool/colibri/
#colibri-test-subscribe: /var/spool/colibri/
colibri-test-unsubscribe: /var/spool/colibri/
colibri-test-owner: /var/spool/colibri/

Web configuration

I use Gunicorn to serve python apps, and Nginx as the web frontend spoonfeeder. This kind of setup is very typical and well documented on the net.
Colibri is installed in /usr/olocal/www/webapps/colibri/.

The host file for nginx looks like this:

server {                                                                                                                                                                      
    listen [::]:80;                                                                                                                                                           
    server_name lists.freehackers.org;                                                                                                                                        

    access_log /var/log/nginx/lists.freehackers.org/access_log;
    error_log /var/log/nginx/lists.freehackers.org/error_log;

    location /static/ {
        # readonly static data
        alias /usr/olocal/web-ro/staticprod/colibri/;
    }

    location / {
        include forward.conf;
        proxy_redirect off;
        proxy_read_timeout 900;
        proxy_pass http://unix:/var/sockets/gunicorn/colibri.socket;
    }
}

Init.d script

in the source you can find scripts/gentoo.initsript which should be installed as /etc/init.d/colibrid. The script is probably easy to adapt to other distributions. Please contact me if you do so, I will include it in the source code, and I will be able to update it when/if modifications are made.

Solving problems

When colibrid starts, some checks are performed, like availability of mhonarc or permissions on the spool directory. If any check fails, colibrid will refuse to start and print informations about failing tests. The configuration of log files is in the file colibrisettings.py : check those log files to know what the problem is/are.

Updated by Thomas Capricelli over 7 years ago ยท 9 revisions