Table Of Contents

Previous topic

Setup MailScanner

Next topic

Baruwa on Centos/RHEL

This Page


Source installation

Download the Baruwa source and untar it:

# tar xzvf baruwa-<version>.tar.gz
# cd baruwa-<version>

Make sure you have the required packages installed as well as a working MailScanner setup then proceed. The following commands should be run as a privileged user.

Create the database:

# mysqladmin -u root -p create baruwa

Create a Mysql user for baruwa

Run the command from the mysql prompt:

mysql> GRANT ALL ON baruwa.* TO baruwa@localhost IDENTIFIED BY '<password>';
mysql> flush privileges;

Install Baruwa


# python install

Configure the Baruwa settings

Edit the Baruwa file:

# baruwa_path=$(python2.4 -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")
# vi $baruwa_path/

Set the following options:

DATABASE_NAME = 'baruwa'
DATABASE_USER = 'baruwa'
DATABASE_PASSWORD = '<password>'
DATABASE_HOST = 'localhost'

Populate the database and create admin user:

# $baruwa_path/baruwa/ syncdb

The syncdb command populates your SQL database and allows you to create the admin user.

Edit the file and make the baruwa specific changes to suit your install:

# vi $baruwa_path/

Link to the dojo toolkit:

# ln -s /path/to/dojo $baruwa_path/baruwa/static/js
# ln -s /path/to/dojox $baruwa_path/baruwa/static/js
# ln -s /path/to/dijit $baruwa_path/baruwa/static/js

Setup Web server


Make sure mod_wsgi is enabled, uncomment the following line in /etc/httpd/conf.d/wsgi.conf:

LoadModule wsgi_module modules/

Use the sample configuration provided (extras/baruwa-mod_wsgi.conf) as a template. Copy to your apache configuration directory usually /etc/httpd/conf.d

Make sure that your apache is configured for name based virtual hosting such that you can run other sites on the same box if you wish to.

Edit /etc/httpd/conf.d/baruwa-mod_wsgi.conf and set ServerName to the hostname you will use to access baruwa

Restart apache for the configuration to take effect.:

# /etc/init.d/httpd reload


Use the generic django instructions at


Use the nginx instructions at


Use the cherokee cookbook instructions at

Thats it

Point your browser to http://hostname_used login with admin user and password and start working. You can now use the interface to add users, domains and process messages, etc etc.