You can choose between two options:
The easiest one is to install it from the PyPI. Just run the following command and you’re done:
$ pip install modoboa
If you prefer to use the tarball, download the latest one and run the following procedure:
$ tar xzf modoboa-<version>.tar.gz
$ cd modoboa-<version>
$ python setup.py install
All dependencies will be installed regardless the way you chose. The only exception concerns the RRDtool binding because there isn’t any python package available, it is directly provided with the official tarball.
Fortunately, all major distributions include a ready-to-use package. On Debian/Ubuntu:
$ apt-get install python-rrdtool
Thanks to django, Modoboa supports several databases. Depending on the one you will use, you must install the appropriate python package:
Then, create a user and a database that will be used by Modoboa. Make sure your database is using UTF8 as a default charset.
modoboa-admin.py, a command line tool, let you deploy a ready-to-use Modoboa site using only one instruction:
$ modoboa-admin.py deploy modoboa_example --syncdb --collectstatic [--with-amavis]
Just answer the few questions and you’re done. You can now go to the First use section.
Note
The –with-amavis option must be set only if you intend to use the Amavisd-new frontend.
As Modoboa is a set of Django applications, you need to create a new project. Just run the following commands:
$ cd /var/www
$ django-admin.py startproject modoboa_example
$ cd modoboa_example
$ rm settings.py
$ rm urls.py
$ wget http://modoboa.org/resources/settings.py
$ wget http://modoboa.org/resources/urls.py
$ mkdir media
Then, edit the freshly downloaded settings.py file and adjust the database relative information. (see Database).
Note
If you plan to serve Modoboa using a URL prefix, you must change the value of the LOGIN_URL parameter to LOGIN_URL = '/<prefix>/accounts/login/'.
Finally, run the following commands:
$ python manage.py collectstatic
$ python manage.py syncdb --migrate --noinput
$ python manage.py loaddata initial_users.json
Your installation should now have a default super administrator:
It is strongly recommended to change this password the first time you log into Modoboa.
To check if your installation works, just launch the embedded HTTP server:
$ python manage.py runserver
You should be able to access Modoboa at http://locahost:8000/.
For a production environnement, we recommend using a stable webserver like Apache2 or Nginx.