source: mailjam/docs/src/install.rst@ 30:0cdc4f160073

Last change on this file since 30:0cdc4f160073 was 27:b1d527287347, checked in by Borja Lopez <borja@…>, 12 years ago

Added more information to the README file

Updated the architecture scheme so it fits the renaming of the project
to mailjam

Fixed the search path for configuration files. Now it searches on /etc
first, /usr/local/etc then.

Added more docs regarding the installation, configuration and running
of each component

File size: 7.4 KB

Installation instructions

Installing Mailjam is quite easy. If you have some experience installing Python packages [1], you already know how to do it. Mailjam is a standard Python package available on pypi [3] so just use your favourite tool (pip, easy_install, etc) to intall it.

Keep reading if you want to learn more about the different options/choices you have when installing Mailjam.

First, install dependencies

So far, the only dependency you will need in order to run mailjam is Python

Mailjam has been tested with python 2.7.x, but it should work with versions 2.6.x too.

Please, refer to your operating system documentation to learn more about how to install python.

Second, install Mailjam

You can install Mailjam using one of the available tools for installing Python packages, or you can install it from sources. Keep reading to learn more about it.

Installing using pip

You can install Mailjam using pip:

pip install Mailjam

Note

The previous command will install the latest release from pypi. If you would like to install the latest bleeding edge sources (unstable code), you can do it using pip too:

pip install -e https://bitbucket.org/codigo23/mailjam#egg=mailjam

Installing using easy_install

You can install Mailjam using easy_install:

easy_install Mailjam

Installing inside a virtualenv

You can install Mailjam inside a virtualenv. Just create a virtualenv:

virtualenv /path/to/your/env

Then activate it:

source /path/to/your/env/bin/activate

Note

If your shell is csh/tcsh remember you have to activate the environment this way:

source /path/to/your/env/bin/activate.csh

And, once the environment has been activated, use pip to install Mailjam:

env$ pip install Mailjam

Note

Remember that you can install the latest bleeding edge version using pip too:

env$ pip install -e https://bitbucket.org/codigo23/mailjam#egg=mailjam

Installing from sources

When installing from sources, you can download one of the official releases or you can go with the bleeding edge and get a copy of the official source code repository.

Releases

You can grab a copy of the latest release from pypi:

http://pypi.python.org/packages/source/m/mailjam/

After downloaded, you have to unpack the sources:

tar -zxvvf mailjam-0.1.0.tar.gz

This will create a directory called mailjam-0.1.0, go inside that directory and run:

python setup.py install

Warning

If you want to install it system-wide, probably you will need root privileges (check your OS documentation to learn more about how to get root privileges - for example using sudo)

Note

This process will work inside a virtualenv too.

From repository

The source code of Mailjam is hosted in bitbucket [2]. In order to grab the latest sources you need Mercurial.

To get a copy of the sources, just clone the repository:

hg clone https://bitbucket.org/codigo23/mailjam mailjam-repo

Then, go inside the mailjam-repo directory and run:

python setup.py install

Warning

If you want to install it system-wide, probably you will need root privileges (check your OS documentation to learn more about how to get root privileges - for example using sudo)

Note

This process will work inside a virtualenv too.

Setting up Mailjam

In order to setup Mailjam, you will have to create the needed :doc:`configuration files <configuration>`. Each component has its own configuration file:

?

Refer to each configuration file documentation to learn more about the different settings you can customize.

Each component will search for its configuration file in a list of predefined locations, but you can override that behaviour using the -c parameter when starting the component.

Note

Mailjam will search for the config files, in order, through the following paths:

  1. /etc/mailjam
  2. /etc
  3. /usr/local/etc/mailjam
  4. /usr/local/etc
  5. the conf directory within the sources (or the installed egg [4])

For example, you can start the :ref:`overview_mailjam_daemon` passing /var/db/mailjam/mailjam.conf as its configuration file:

?
mailjam-server -c /var/db/mailjam/mailjam.conf
?
.. seealso::

   :doc:`running` contains more information about how to run the different
   components.

If you have installed Mailjam using pip, easy_install or even from sources, the setup process should have taken care of the configuration files, adding a copy of the default files included in the sources to the default destination.

Warning

The default destination will be different based on your operating system. For example, in most linux servers it will copy the files to /etc/mailjam, while in BSD servers it will copy the files to /usr/local/etc/mailjam.

?
.. seealso::

   :doc:`Configuration files, settings and formats documentation <configuration>`


Running Mailjam

In order to run a full Mailjam environment, you will have to start the different components separately:

  1. :ref:`Start the daemon <running_daemon>`

    ?
  2. :ref:`Run the cli client and manage your mailing lists <running_cli_client>`

    ?
  3. :ref:`Add as much MTA clients as you need to your mail server<running_mta_client>`

    ?

The daemon will have to be running all the time (it is the component responsible for providing information to the clients). You will need the CLI client to add, edit or delete mailing lists and each MTA client will be responsible to handle incoming emails for each mailing list.

Running tests (developers only)

Just in case you were wondering, yes, Mailjam code has some tests you can run to check everything is ok and that the software should run smoothly on your server(s).

To run the tests, simply get a copy of the sources from our public repository:

hg clone https://bitbucket.org/codigo23/mailjam mailjam-repo

then run the tests:

cd mailjam-repo && ./bin/run_tests
[1]http://docs.python.org/tutorial/modules.html#packages
[2]https://bitbucket.org/codigo23/mailjam
[3]http://pypi.python.org/pypi/mailjam
[4]http://svn.python.org/projects/sandbox/trunk/setuptools/doc/formats.txt
Note: See TracBrowser for help on using the repository browser.