Ignore:
Timestamp:
May 23, 2012, 6:32:54 PM (13 years ago)
Author:
Borja Lopez <borja@…>
Branch:
default
Phase:
public
Message:

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

Location:
docs/src/_build/html/_sources
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • docs/src/_build/html/_sources/configuration.txt

    r16 r27  
    22=============
    33
     4Mailjam has separate configuration files for the different apps (the daemon and
     5the variety of different clients available). Check below to read more about the
     6configuration file you need to modify depending on what you want to do.
     7
    48.. contents::
    59
    610.. _configuration_daemon:
    711
    8 Mailjam daemon configuration file
    9 ---------------------------------
    10 
    11 All the configurations that can be applied to the Mailjam daemon are registered
    12 in the **mailjam.conf** file. That file contains ini-style [1]_ configuration
    13 parameters, separated in different *categories*.
     12Mailjam daemon configuration file - mailjam.conf
     13------------------------------------------------
     14
     15All the configurations that can be applied to the :ref:`overview_mailjam_daemon`
     16are registered in the **mailjam.conf** file. That file contains ini-style [1]_
     17configuration parameters, separated in different *categories*.
    1418
    1519.. note::
     
    1822   your setup. The usual locations are:
    1923
    20    - */etc/mailjam.conf* - In most Linux systems (like archlinux, gentoo,
    21      fedora, debian, ubuntu, etc)
    22 
    23    - */usr/local/etc/mailjam.conf* - In most BSD systems (like FreeBSD, OpenBSD,
    24      NetBSD, etc)
     24   - */etc/mailjam/mailjam.conf* - In most Linux systems (like archlinux,
     25     gentoo, fedora, debian, ubuntu, etc)
     26
     27   - */usr/local/etc/mailjam/mailjam.conf* - In most BSD systems (like FreeBSD,
     28     OpenBSD, NetBSD, etc)
    2529
    2630   There is a copy of the configuration file in the *conf/* directory, within
     
    6266***
    6367
    64 Default: ``off`` (because ssl support hasn't been added yet)
    65 
    66 Enables/disables SSL [3]_ support in the daemon. If ``off`` all the traffic
    67 to/from the server will travel unencrypted. If ``on`` all the traffic will
     68Default: ``false`` (because ssl support hasn't been added yet)
     69
     70Enables/disables SSL [3]_ support in the daemon. If ``false`` all the traffic
     71to/from the server will travel unencrypted. If ``true`` all the traffic will
    6872travel encrypted.
    6973
     
    295299will be able to reset those passwords.
    296300
     301.. _configuration_mta_client:
     302
     303Mailjam MTA client configuration file - mailjam-mta.conf
     304--------------------------------------------------------
     305
     306This file contains all the parameters to configure the
     307:ref:`overview_mailjam_mta_client` properly. It contains ini-style [1]_
     308configuration parameters, separated in different *categories*.
     309
     310.. note::
     311
     312   The mailjam-mta.conf file will be installed in different locations
     313   depending on your setup. The usual locations are:
     314
     315   - */etc/mailjam/mailjam-mta.conf* - In most Linux systems (like archlinux,
     316     gentoo, fedora, debian, ubuntu, etc)
     317
     318   - */usr/local/etc/mailjam/mailjam-mta.conf* - In most BSD systems (like
     319     FreeBSD, OpenBSD, NetBSD, etc)
     320
     321   There is a copy of the configuration file in the *conf/* directory, within
     322   the sources.
     323
     324.. _configuration_mta_client_server:
     325
     326server
     327++++++
     328
     329This section contains the configuration parameters that tell the MTA client
     330where to connect when trying to interact with the
     331:ref:`overview_mailjam_daemon`.
     332
     333These are all the available parameters in this section:
     334
     335.. _configuration_mta_client_server_address:
     336
     337address
     338*******
     339
     340Default: ``localhost``
     341
     342The address where the daemon is listening for XMLRPC requests. This is
     343the address to where the client will try to connect to.
     344
     345.. _configuration_mta_client_server_port:
     346
     347port
     348****
     349
     350Default: ``9876``
     351
     352The port where the daemon accepts incoming XMLRPC requests. This is the
     353port to where the client will try to connect to.
     354
     355.. _configuration_mta_client_server_uri:
     356
     357uri
     358***
     359
     360Default: http://localhost:9876
     361
     362This is the URI [4]_ to where the client will connect to. It is constructed
     363based on the values of the :ref:`configuration_mta_client_server_address`
     364and :ref:`configuration_mta_client_server_port` parameters.
     365
     366.. note::
     367
     368   The default configuration file contains a dynamic setting for this
     369   parameter::
     370
     371     uri = http://%(address)s:%(port)s
     372
     373   That means that the parameter will inherit the values from the
     374   :ref:`configuration_mta_client_server_address`
     375   and :ref:`configuration_mta_client_server_port` parameters.
     376
     377.. seealso::
     378
     379   More information about this (and other tricks) here:
     380
     381   http://docs.python.org/library/configparser.html
     382
     383   http://www.doughellmann.com/PyMOTW/ConfigParser
     384
     385.. warning::
     386
     387   You can replace this with any URI you would like, **this is the parameter
     388   that is really used for establishing new connections** so be aware that if
     389   you remove the references to the
     390   :ref:`configuration_mta_client_server_address` and
     391   :ref:`configuration_mta_client_server_port` parameters, the values you have
     392   provided for those parameters will be ignored.
     393
     394.. _configuration_mta_client_server_ssl:
     395
     396ssl
     397***
     398
     399Default: ``false`` (because ssl support hasn't been added yet)
     400
     401Enables/disables SSL [3]_ connections to the daemon. If ``false`` all the
     402traffic to/from the server will travel unencrypted. If ``true`` all the traffic
     403will travel encrypted.
     404
     405.. warning::
     406
     407   In order to enable SSL support in the client, you have to be sure the
     408   :ref:`overview_mailjam_daemon` supports SSL too (check the
     409   :ref:`configuration_daemon_xmlrpc_ssl` parameter in the
     410   :ref:`configuration_daemon_xmlrpc` section of the
     411   :ref:`daemon configuration file <configuration_daemon>`)
     412
     413.. _configuration_mta_client_archive:
     414
     415archive
     416+++++++
     417
     418This section contains the configuration parameters that set where the files
     419generated by the client will be stored/saved.
     420
     421.. seealso::
     422
     423   For more information about the kind of files the client does generate,
     424   take a look at the
     425   :ref:`MTA client documentation <overview_mailjam_mta_client>`.
     426
     427These are all the available parameters in this section:
     428
     429.. _configurtion_mta_client_archive_persistent:
     430
     431persistent
     432**********
     433
     434Default: ``true``
     435
     436Enables/disables the local archive for the client. If ``true``, the client
     437will save a copy of every email sent to the list in an internal archive,
     438that could be checked/queried later. If ``false``, the emails will not be
     439kept on disk after being processed.
     440 
     441.. warning::
     442
     443   This feature is not ready yet.
     444
     445
     446.. _configuration_mta_client_archive_path:
     447
     448path
     449****
     450
     451Default: ``/usr/local/mailjam/archive-mta``
     452
     453Path to the directory where the archives will be saved.
     454
     455.. warning::
     456
     457   This feature is not ready yet.
     458
     459
     460.. _configuration_cli_client:
     461
     462Mailjam CLI client configuration file - mailjam-cli.conf
     463--------------------------------------------------------
     464
     465This file contains all the parameters to configure the
     466:ref:`overview_mailjam_cli_client` properly. It contains ini-style [1]_
     467configuration parameters, separated in different *categories*.
     468
     469.. note::
     470
     471   The mailjam-cli.conf file will be installed in different locations
     472   depending on your setup. The usual locations are:
     473
     474   - */etc/mailjam/mailjam-cli.conf* - In most Linux systems (like archlinux,
     475     gentoo, fedora, debian, ubuntu, etc)
     476
     477   - */usr/local/etc/mailjam/mailjam-cli.conf* - In most BSD systems (like
     478     FreeBSD, OpenBSD, NetBSD, etc)
     479
     480   There is a copy of the configuration file in the *conf/* directory, within
     481   the sources.
     482
     483.. _configuration_cli_client_server:
     484
     485server
     486++++++
     487
     488This section contains the configuration parameters that tell the cli client
     489where to connect when trying to interact with the
     490:ref:`overview_mailjam_daemon`.
     491
     492These are all the available parameters in this section:
     493
     494.. _configuration_cli_client_server_address:
     495
     496address
     497*******
     498
     499Default: ``localhost``
     500
     501The address where the daemon is listening for XMLRPC requests. This is
     502the address to where the client will try to connect to.
     503
     504.. _configuration_cli_client_server_port:
     505
     506port
     507****
     508
     509Default: ``9876``
     510
     511The port where the daemon accepts incoming XMLRPC requests. This is the
     512port to where the client will try to connect to.
     513
     514.. _configuration_cli_client_server_uri:
     515
     516uri
     517***
     518
     519Default: http://localhost:9876
     520
     521This is the URI [4]_ to where the client will connect to. It is constructed
     522based on the values of the :ref:`configuration_cli_client_server_address`
     523and :ref:`configuration_cli_client_server_port` parameters.
     524
     525.. note::
     526
     527   The default configuration file contains a dynamic setting for this
     528   parameter::
     529
     530     uri = http://%(address)s:%(port)s
     531
     532   That means that the parameter will inherit the values from the
     533   :ref:`configuration_cli_client_server_address`
     534   and :ref:`configuration_cli_client_server_port` parameters.
     535
     536.. seealso::
     537
     538   More information about this (and other tricks) here:
     539
     540   http://docs.python.org/library/configparser.html
     541
     542   http://www.doughellmann.com/PyMOTW/ConfigParser
     543
     544.. warning::
     545
     546   You can replace this with any URI you would like, **this is the parameter
     547   that is really used for establishing new connections** so be aware that if
     548   you remove the references to the
     549   :ref:`configuration_cli_client_server_address` and
     550   :ref:`configuration_cli_client_server_port` parameters, the values you have
     551   provided for those parameters will be ignored.
     552
     553.. _configuration_cli_client_server_ssl:
     554
     555ssl
     556***
     557
     558Default: ``false`` (because ssl support hasn't been added yet)
     559
     560Enables/disables SSL [3]_ connections to the daemon. If ``false`` all the
     561traffic to/from the server will travel unencrypted. If ``true`` all the traffic
     562will travel encrypted.
     563
     564.. warning::
     565
     566   In order to enable SSL support in the client, you have to be sure the
     567   :ref:`overview_mailjam_daemon` supports SSL too (check the
     568   :ref:`configuration_daemon_xmlrpc_ssl` parameter in the
     569   :ref:`configuration_daemon_xmlrpc` section of the
     570   :ref:`daemon configuration file <configuration_daemon>`)
     571
     572.. _configuration_cli_client_history:
     573
     574history
     575+++++++
     576
     577This section contains the configuration parameters that set the behaviour
     578of the client feature that allows it to save a history of commands provided
     579by the user.
     580
     581These are all the available parameters in this section:
     582
     583.. _configurtion_cli_client_archive_enabled:
     584
     585enabled
     586*******
     587
     588Default: ``true``
     589
     590Enables/disables history support in the client. If ``true`` all commands
     591provided by an user will be saved to disk. If ``false`` nothing will be
     592written to disk.
     593
     594.. _configuration_cli_client_history_path:
     595
     596path
     597****
     598
     599Default: ``~/.mailjam/cli/history``
     600
     601Path to the file where the list of executed commands will be saved.
     602
    297603
    298604.. [1] http://en.wikipedia.org/wiki/INI_file
    299605.. [2] http://en.wikipedia.org/wiki/XML-RPC
    300606.. [3] http://en.wikipedia.org/wiki/Secure_Socket_Layer
     607.. [4] http://en.wikipedia.org/wiki/Uniform_resource_identifier
  • docs/src/_build/html/_sources/examples.txt

    r13 r27  
    33
    44.. contents::
     5
     6TBW
  • docs/src/_build/html/_sources/install.txt

    r16 r27  
    22=========================
    33
     4Installing Mailjam is quite easy. If you have some experience installing
     5Python_ packages [1]_, you already know how to do it. Mailjam is a standard
     6Python_ package available on pypi_ [3]_ so just use your favourite tool
     7(pip_, easy_install_, etc) to intall it.
     8
     9Keep reading if you want to learn more about the different options/choices
     10you have when installing Mailjam.
     11
    412.. contents::
    513
     
    1422*2.6.x* too.
    1523
    16 Please, refer to your operating system package system documentation to learn
    17 more about how to install python.
     24Please, refer to your operating system documentation to learn more about how
     25to install python.
    1826
    1927.. _install_mailjam:
     
    2230-----------------------
    2331
     32You can install Mailjam using one of the available tools for installing Python_
     33packages, or you can install it from sources. Keep reading to learn more about
     34it.
     35
    2436.. _install_with_pip:
    2537
     
    2941You can install Mailjam using pip_::
    3042
    31   pip install -e https://bitbucket.org/codigo23/mailjam#egg=mailjam
    32 
    33 .. note::
    34 
    35    Mailjam has not been recorded/uploaded to pypi_ yet, so, in order to install
    36    it using pip you will have to provide the URL for the public Mailjam repo.
     43  pip install Mailjam
     44
     45.. note::
     46
     47   The previous command will install the latest release from pypi_. If you
     48   would like to install the latest *bleeding edge* sources (unstable code),
     49   you can do it using pip_ too::
     50
     51     pip install -e https://bitbucket.org/codigo23/mailjam#egg=mailjam
    3752
    3853.. _install_with_easy_install:
     
    4156+++++++++++++++++++++++++++++
    4257
    43 You can not install Mailjam using easy_install_ yet (until we do record/upload
    44 it to pypi)
     58You can install Mailjam using easy_install_::
     59
     60  easy_install Mailjam
    4561
    4662.. _install_inside_virtualenv:
     
    6682And, once the environment has been activated, use pip to install Mailjam::
    6783
    68   env$ pip install -e https://bitbucket.org/codigo23/mailjam#egg=mailjam
     84  env$ pip install Mailjam
     85
     86.. note::
     87
     88   Remember that you can install the latest *bleeding edge* version using
     89   pip_ too::
     90   
     91     env$ pip install -e https://bitbucket.org/codigo23/mailjam#egg=mailjam
    6992
    7093.. _install_from_sources:
     
    82105********
    83106
    84 **There are no releases yet**. You will have to install it from the repository.
    85 
    86 .. _install_from_repository:
    87 
    88 From repository
    89 ***************
    90 
    91 The source code of Mailjam is hosted in bitbucket_ [1]_. In order to grab
    92 the latest sources you need Mercurial_.
    93 
    94 To get a copy of the sources, just *clone* the repository::
    95 
    96   hg clone https://bitbucket.org/codigo23/mailjam mailjam-repo
    97 
    98 Then, go inside the *mailjam-repo* directory and run::
     107You can grab a copy of the latest release from pypi_:
     108
     109http://pypi.python.org/packages/source/m/mailjam/
     110
     111After downloaded, you have to unpack the sources::
     112
     113  tar -zxvvf mailjam-0.1.0.tar.gz
     114
     115This will create a directory called *mailjam-0.1.0*, go inside that directory
     116and run::
    99117
    100118  python setup.py install
     
    110128   This process will work inside a virtualenv_ too.
    111129
     130.. _install_from_repository:
     131
     132From repository
     133***************
     134
     135The source code of Mailjam is hosted in bitbucket_ [2]_. In order to grab
     136the latest sources you need Mercurial_.
     137
     138To get a copy of the sources, just *clone* the repository::
     139
     140  hg clone https://bitbucket.org/codigo23/mailjam mailjam-repo
     141
     142Then, go inside the *mailjam-repo* directory and run::
     143
     144  python setup.py install
     145
     146.. warning::
     147
     148   If you want to install it *system-wide*, probably you will need *root*
     149   privileges (check your OS documentation to learn more about how to get
     150   *root* privileges - for example using sudo_)
     151
     152.. note::
     153
     154   This process will work inside a virtualenv_ too.
     155
    112156.. _install_setting_up_mailjam:
    113157
     
    115159------------------
    116160
    117 TBW
     161In order to setup Mailjam, you will have to create the needed
     162:doc:`configuration files <configuration>`. Each component has its own
     163configuration file:
     164
     165- The :ref:`Mailjam daemon <overview_mailjam_daemon>` configuration file is
     166  :ref:`mailjam.conf <configuration_daemon>`
     167
     168- The :ref:`Mailjam MTA client <overview_mailjam_mta_client>` configuration
     169  file is :ref:`mailjam-mta.conf <configuration_mta_client>`
     170
     171- The :ref:`Mailjam CLI client <overview_mailjam_cli_client>` configuration
     172  file is :ref:`mailjam-cli.conf <configuration_cli_client>`
     173
     174Refer to each configuration file documentation to learn more about the different
     175settings you can customize.
     176
     177Each component will search for its configuration file in a list of predefined
     178locations, but you can override that behaviour using the *-c* parameter when
     179starting the component.
     180
     181.. note::
     182
     183   Mailjam will search for the config files, in order, through the following
     184   paths:
     185
     186   1. /etc/mailjam
     187
     188   2. /etc
     189
     190   3. /usr/local/etc/mailjam
     191
     192   4. /usr/local/etc
     193
     194   5. the *conf* directory within the sources (or the installed *egg* [4]_)
     195
     196For example, you can start the :ref:`overview_mailjam_daemon` passing
     197*/var/db/mailjam/mailjam.conf* as its configuration file::
     198
     199  mailjam-server -c /var/db/mailjam/mailjam.conf
     200
     201.. seealso::
     202
     203   :doc:`running` contains more information about how to run the different
     204   components.
     205
     206If you have installed Mailjam using pip_, easy_install_ or even from sources,
     207the setup process should have taken care of the configuration files, adding
     208a copy of the default files included in the sources to the default
     209destination.
     210
     211.. warning::
     212
     213   The default destination will be different based on your operating system.
     214   For example, in most linux servers it will copy the files to */etc/mailjam*,
     215   while in BSD servers it will copy the files to */usr/local/etc/mailjam*.
     216
     217.. seealso::
     218
     219   :doc:`Configuration files, settings and formats documentation <configuration>`
     220
    118221
    119222.. _install_running_mailjam:
     
    122225---------------
    123226
    124 TBW
     227In order to run a full Mailjam environment, you will have to start the different
     228components separately:
     229
     2301. :ref:`Start the daemon <running_daemon>`
     231
     2322. :ref:`Run the cli client and manage your mailing lists <running_cli_client>`
     233
     2343. :ref:`Add as much MTA clients as you need to your mail server<running_mta_client>`
     235
     236The daemon will have to be running all the time (it is the component responsible
     237for providing information to the clients). You will need the CLI client to add,
     238edit or delete mailing lists and each MTA client will be responsible to handle
     239incoming emails for each mailing list.
    125240
    126241.. _install_running_tests:
     
    129244-------------------------------
    130245
    131 TBW
     246Just in case you were wondering, **yes**, Mailjam code has some tests you can
     247run to check everything is ok and that the software should run smoothly on your
     248server(s).
     249
     250To run the tests, simply get a copy of the sources from our public repository::
     251
     252  hg clone https://bitbucket.org/codigo23/mailjam mailjam-repo
     253
     254then run the tests::
     255
     256  cd mailjam-repo && ./bin/run_tests
     257
    132258
    133259.. _Python: http://python.org
     
    140266.. _sudo: http://sudo.ws
    141267
    142 .. [1] https://bitbucket.org/codigo23/mailjam
     268.. [1] http://docs.python.org/tutorial/modules.html#packages
     269.. [2] https://bitbucket.org/codigo23/mailjam
     270.. [3] http://pypi.python.org/pypi/mailjam
     271.. [4] http://svn.python.org/projects/sandbox/trunk/setuptools/doc/formats.txt
  • docs/src/_build/html/_sources/overview.txt

    r16 r27  
    1818   :class: open_fancybox
    1919
     20This architecture works for small setups (everything running on a single server)
     21but it works for bigger/larger installations with up to N mail servers, running
     22each server its own :ref:`overview_mailjam_mta_client` (or multiple instances
     23of it) to connect to N :ref:`overview_mailjam_daemon` servers (managed locally
     24or remotely using up to N :ref:`overview_mailjam_cli_client` or
     25:ref:`overview_mailjam_web_client` instances).
     26
     27.. seealso::
     28
     29   :doc:`The examples documentation <examples>` contains some useful examples
     30   about different kinds of setups.
    2031
    2132.. _overview_mailjam_daemon:
  • docs/src/_build/html/_sources/running.txt

    r16 r27  
    22===============
    33
     4In order to run Mailjam, you have to run the different components, depending on
     5what you want to do. Basically, you will need to run a server
     6(:ref:`overview_mailjam_daemon`) all the time, then you will need one
     7:ref:`overview_mailjam_mta_client` per mailing list.
     8
     9Ocasionally, you will need to add or delete a mailing list, or edit its
     10information, members list, etc. To do that, you will have to run a Mailjam
     11client (either the :ref:`CLI client <overview_mailjam_cli_client>` or the
     12:ref:`Web client <overview_mailjam_web_client>`).
     13
     14Keep reading if you want to learn more about the way you can start each
     15component, the different arguments/parameters you can provide on startup, etc.
     16
     17.. warning::
     18
     19   Remember that, before being able to run any component, you have to
     20   :ref:`set up proper configuration files <install_setting_up_mailjam>`. You
     21   can learn more about Mailjam configuration files in the
     22   :doc:`configuration files documentation <configuration>`.
     23
    424.. contents::
     25
     26.. _running_daemon:
     27
     28The daemon
     29----------
     30
     31First component you should start is the :ref:`overview_mailjam_daemon`. It is
     32quite easy, just run this command from a shell/console::
     33
     34  mailjam-server
     35
     36The server process will read the :ref:`mailjam.conf <configuration_daemon>`
     37configuration file, will prepare everything and will start listening for XMLRPC
     38requests on *localhost:9876*
     39
     40.. warning::
     41
     42   *localhost:9876* is the default value provided by the default configuration
     43   files. If you have modified that, it will be a different *address:port*
     44   combination.
     45
     46.. warning::
     47
     48   If you didn't add a valid configuration file to one of the
     49   :ref:`default paths <install_setting_up_mailjam>`, the server will refuse to
     50   start, giving you an error message.
     51
     52.. warning::
     53
     54   As of the current version of Mailjam, there are no pre-made init scripts that
     55   can handle the start/stop/restart of the daemon, but those will be added in
     56   one of the future releases.
     57
     58.. _running_daemon_parameters:
     59
     60Additional parameters
     61+++++++++++++++++++++
     62
     63You can pass some parameters to *mailjam-server* to modify the behaviour of
     64the daemon or get more information.
     65
     66.. note::
     67
     68   Remember that the proper way to modify the behaviour of the daemon is
     69   editing its configuration file, :ref:`mailjam.conf <configuration_daemon>`
     70
     71.. _running_daemon_help:
     72
     73--help
     74******
     75
     76You can get some help by passing the *-h* or *--help* parameters::
     77
     78  mailjam-server -h
     79
     80::
     81
     82  mailjam-server --help
     83
     84.. _running_daemon_config:
     85
     86--config
     87********
     88
     89You can set the path to the config file the server will load on startup,
     90passing the *-c* or *--config* parameters::
     91
     92  mailjam-server -c /home/mailjam/mailjam.conf
     93
     94::
     95
     96  mailjam-server --config /home/mailjam/mailjam.conf
     97 
     98.. warning::
     99
     100   If the file does not exist, or if it is not a valid configuration file,
     101   an error will be shown and the daemon will refuse to start.
     102
     103.. _running_daemon_version:
     104
     105--version
     106*********
     107
     108You can check the version of the mailjam server you are trying to run by
     109passing the *-v* or *--version* parameters::
     110
     111  mailjam-server -v
     112
     113::
     114
     115  mailjam-server --version
     116
     117
     118.. _running_cli_client:
     119
     120The CLI client
     121--------------
     122
     123
     124
     125.. _running_mta_client:
     126
     127The MTA client
     128--------------
     129
     130Once you have your :ref:`daemon running <running_daemon>`, you have to add
     131as many :ref:`MTA clients <overview_mailjam_mta_client>` as mailing lists you
     132want to manage to your mail server.
     133
     134.. _running_mta_client_quick:
     135
     136Quick configuration (you are a mail-servers-master)
     137+++++++++++++++++++++++++++++++++++++++++++++++++++
     138
     139Edit your mail server aliases file [1]_ (probably */etc/aliases* or
     140*/etc/mail/aliases*) and add an entry like::
     141
     142  list@mydomain.com: "|/usr/local/bin/mailjam-mta -a list@mydomain.com -i -"
     143
     144.. warning::
     145   
     146   replace *list@mydomain.com* with the real address of your mailing list
     147
     148.. warning::
     149
     150   replace */usr/local/bin/mailjam-mta* with the real path to your mailjam-mta
     151   installation
     152
     153Rebuild your *aliases* database::
     154
     155  newaliases
     156
     157.. warning::
     158
     159   Refer to your OS documentation to see how you can rebuild *aliases*. In most
     160   unix-like systems it is done by the newaliases [2]_ command.
     161
     162.. _running_mta_client_explained:
     163
     164Explained configuration (you really want to know what's happening here)
     165+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
     166
     167When new messages arrive at your mail server for your mailing list address
     168(let's use the example address *list@mydomain.com*) one of the steps in the
     169process that checks the message, it's origin, destination, contents, etc is
     170the step where the mail server checks its internal *aliases* database, that is,
     171a list of *special* addresses that, instead of being *real* addresses, they are
     172related to some other addresses in some way.
     173
     174Most MTAs out there support one very *convenient* feature that is to *pipe* the
     175contents of the message (headers and body) to a given shell command. That means
     176that the all the received data will be sent to an external command for it to
     177process such data.
     178
     179**Here is where mailjam-mta comes in**.
     180
     181What you have to do is just tell your mail server that all messages with
     182destination *list@mydomain.com* (to keep using the same example address) will be
     183*piped* to mailman-mta. The Mailjam MTA client will then know what to do with
     184the message, performing some checks and re-sending it to the proper destinations
     185(the members/suscriptors of the given mailing list).
     186
     187So, first thing you have to find out is **where is your aliases file?**.
     188
     189In unix-like systems, like the different Linux distributions or the different
     190BSD flavours, that file is */etc/mail/aliases* or */etc/aliases* (usually one is
     191a simbolic link to the other).
     192
     193.. note::
     194
     195   Usually the aliases file contains some lines like::
     196
     197     MAILER-DAEMON: postmaster
     198     postmaster: root
     199
     200Once you've found out where the file is, edit it and add this line to the bottom
     201of the file::
     202
     203  list@mydomain.com: "|/usr/local/bin/mailjam-mta -a list@mydomain.com -i -"
     204
     205.. warning::
     206   
     207   replace *list@mydomain.com* with the real address of your mailing list
     208
     209.. warning::
     210
     211   replace */usr/local/bin/mailjam-mta* with the real path to your mailjam-mta
     212   installation
     213
     214There you are telling your mail server that any message coming **to**
     215*list@mydomain.com* will be passed to the mailjam-mta command, passing some
     216parameters to it:
     217
     218- **-a list@mydomain.com** tells mailjam-mta that the message is actually for
     219  that mailing list. The MTA client will then use that value to check (against
     220  the mailjam daemon) if it is a valid mailing list.
     221
     222- **-i -** tells mailjam-mta that the message will be *piped* directly. This is
     223  important, as mailjam-mta can read the messages from files, but in this case
     224  the mail server will *pipe* the data directly to mailjam-mta.
     225
     226Once you've added that line to your *aliases* file, you have to rebuild your
     227*aliases* database::
     228
     229  newaliases
     230
     231.. warning::
     232
     233   Refer to your OS documentation to see how you can rebuild *aliases*. In most
     234   unix-like systems it is done by the newaliases [2]_ command.
     235
     236And you are done. Everything is ready now.
     237
     238.. _running_mta_client_parameters:
     239
     240Additional parameters
     241+++++++++++++++++++++
     242
     243You can pass some parameters to *mailjam-mta* to modify the behaviour of
     244the client or get more information.
     245
     246.. note::
     247
     248   Remember that the proper way to modify the behaviour of the client is
     249   editing its configuration file,
     250   :ref:`mailjam-mta.conf <configuration_mta_client>`
     251
     252.. _running_mta_client_help:
     253
     254--help
     255******
     256
     257You can get some help by passing the *-h* or *--help* parameters::
     258
     259  mailjam-mta -h
     260
     261::
     262
     263  mailjam-mta --help
     264
     265.. _running_mta_client_config:
     266
     267--config
     268********
     269
     270You can set the path to the config file the client will load on startup,
     271passing the *-c* or *--config* parameters::
     272
     273  mailjam-mta -c /home/mailjam/mailjam-mta.conf
     274
     275::
     276
     277  mailjam-mta --config /home/mailjam/mailjam-mta.conf
     278 
     279.. warning::
     280
     281   If the file does not exist, or if it is not a valid configuration file,
     282   an error will be shown and the client will refuse to start.
     283
     284.. _running_mta_client_version:
     285
     286--version
     287*********
     288
     289You can check the version of the mailjam client you are trying to run by
     290passing the *-v* or *--version* parameters::
     291
     292  mailjam-mta -v
     293
     294::
     295
     296  mailjam-mta --version
     297
     298.. _running_mta_client_address:
     299
     300--address (required)
     301********************
     302
     303This parameter is required (you have to provide it with a value in order to
     304run the mailjam-mta). It sets the address of the mailing list managed by this
     305MTA client instance.
     306
     307The MTA client will use the provided value to do some checks on the daemon,
     308retrieving all the needed data to perform its tasks.
     309
     310You can pass a valid address using both the *-a* and *--address* parameters::
     311
     312  mailjam-mta -a list@mydomain.com
     313
     314::
     315
     316  mailjam-mta --address list@mydomain.com
     317
     318.. _running_mta_client_input:
     319
     320--input
     321*******
     322
     323This parameter tells mailjam-mta from where it has to read the message sent
     324to the mailing list. That could be a local file (to be readed from disk) or
     325a stream of data coming directly from the standard input (*stdin*).
     326
     327For a regular configuration/setup, the second option is preferred, as the mail
     328server will send the stream of data directly to mailjam-mta (as
     329:ref:`explained before <running_mta_client_explained>`)::
     330
     331  mailjam-mta -i -
     332
     333::
     334
     335  mailjam-mta --input -
     336
     337But perhaps some time you would like to send (again) a message you have on disk,
     338that could be done easily, passing the path to the file containing that message
     339to mailjam-mta::
     340
     341  mailjam-mta -i /home/backups/mail/that-important-mail.txt
     342
     343::
     344
     345  mailjam-mta -input /home/backups/mail/that-important-mail.txt
     346
     347
     348.. _running_web_client:
     349
     350The Web client
     351--------------
     352
     353.. [1] http://en.wikipedia.org/wiki/Email_alias
     354.. [2] http://www.freebsd.org/cgi/man.cgi?query=newaliases
Note: See TracChangeset for help on using the changeset viewer.