From 98f3bbda0fa0ff16a5b39183917c9a5ec65dfc95 Mon Sep 17 00:00:00 2001 From: Antoine Nguyen Date: Wed, 18 Sep 2013 22:14:36 +0200 Subject: [PATCH] Consistency. --- doc/additional/migrating.rst | 4 +- doc/additional/virtualmachine.rst | 11 ++--- doc/extending/plugin_api.rst | 6 +-- doc/getting_started/configuration.rst | 16 +++---- doc/getting_started/install.rst | 12 ++--- doc/getting_started/plugins.rst | 28 +++++------ doc/getting_started/upgrade.rst | 58 +++++++++++----------- doc/integration/imap_and_smtp.rst | 69 ++++++++++++++------------- doc/integration/web_servers.rst | 61 ++++++++++++----------- 9 files changed, 134 insertions(+), 131 deletions(-) diff --git a/doc/additional/migrating.rst b/doc/additional/migrating.rst index beaaa66c1..448e7fdd1 100644 --- a/doc/additional/migrating.rst +++ b/doc/additional/migrating.rst @@ -16,7 +16,7 @@ existing `PostfixAdmin (version 2.3.3+) First, you must follow the :ref:`installation` step to create a fresh Modoboa database. -Once done, edit the *setting.py* file. First, add a new database +Once done, edit the :file:`settings.py` file. First, add a new database connection named ``pfxadmin`` into the ``DATABASES`` variable corresponding to your PostfixAdmin setup:: @@ -56,7 +56,7 @@ used by PostfixAdmin, check its configuration file if you're not sure) Click on the *Save* button. -The procedure is over, edit the *settings.py* file and: +The procedure is over, edit the :file:`settings.py` file and: * remove the ``pfxadmin`` database connection from the ``DATABASES`` variable diff --git a/doc/additional/virtualmachine.rst b/doc/additional/virtualmachine.rst index 942da5a10..471c2c418 100644 --- a/doc/additional/virtualmachine.rst +++ b/doc/additional/virtualmachine.rst @@ -4,9 +4,9 @@ Using the virtual machine Introduction ============ -A virtual machine with a ready-to-use *Modoboa* setup is available -`here `_. It is composed -of the following components: +A virtual machine with a ready-to-use Modoboa setup is available `here +`_. It is composed of +the following components: * Debian 6.0 (squeeze) * Modoboa and its prerequisites @@ -32,7 +32,7 @@ If you can't use the vmdk format, you can use `qemu Then, just use your prefered virtualization software (qemu, kvm, virtualbox, etc.) to start the machine. You'll need to configure at least one bridged network interface if you want to be able to play -with *Modoboa*, ie. your machine must be visible from your network. +with Modoboa, ie. your machine must be visible from your network. The default network interface of the machine (``eth0``) is configured to use the DHCP protocol. @@ -49,7 +49,7 @@ root demo the root user demo demo an unpriviliged user ===== ======== ==================== -To connect to *Modoboa*, first connect to the system and retrieve its +To connect to Modoboa, first connect to the system and retrieve its current network address like this:: $ /sbin/ifconfig eth0 @@ -72,4 +72,3 @@ admin@demo.local admin Administrator of the domain *demo.local*. user@demo.local user Simple user. Can access to applications. ================ ======== ============================================ - diff --git a/doc/extending/plugin_api.rst b/doc/extending/plugin_api.rst index b6d2e5f27..a96381405 100644 --- a/doc/extending/plugin_api.rst +++ b/doc/extending/plugin_api.rst @@ -33,12 +33,12 @@ The required glue ***************** To create a new plugin, just start a new django application like -this (into modoboa's directory):: +this (into Modoboa's directory):: $ python manage.py startapp Then, you need to register this application using the provided -API. Just copy/paste the following example into the *__init__.py* file +API. Just copy/paste the following example into the :file:`__init__.py` file of the future extension:: from modoboa.extensions import ModoExtension, exts_pool @@ -72,7 +72,7 @@ of the future extension:: exts_pool.register_extension(MyExtension) Once done, simply add your plugin's module name to the -``INSTALLED_APPS`` variable located inside *settings.py*. Optionaly, +``INSTALLED_APPS`` variable located inside :file:`settings.py`. Optionaly, run ``python manage.py syncdb`` if your plugin provides custom tables and ``python manage.py collectstatic`` to update static files. diff --git a/doc/getting_started/configuration.rst b/doc/getting_started/configuration.rst index cad72e254..efcf39658 100644 --- a/doc/getting_started/configuration.rst +++ b/doc/getting_started/configuration.rst @@ -86,7 +86,7 @@ Custom logo You have the possibility to use a custom logo instead of the default one on the login page. -To do so, open the *settings.py* file and add a +To do so, open the :file:`settings.py` file and add a ``MODOBOA_CUSTOM_LOGO`` variable. This variable must contain the relative URL of your logo under ``MEDIA_URL``. For example:: @@ -107,7 +107,7 @@ Host configuration To manipulate mailboxes on the filesystem, you must allow the user who runs Modoboa to execute commands as the user who owns mailboxes. -To do so, edit the */etc/sudoers* file and add the following inside:: +To do so, edit the :file:`/etc/sudoers` file and add the following inside:: ALL=() NOPASSWD: ALL @@ -121,7 +121,7 @@ Time zone and language Modoboa is available in many languages. -To specify the default language to use, edit the *settings.py* file +To specify the default language to use, edit the :file:`settings.py` file and modify the ``LANGUAGE_CODE`` variable:: LANGUAGE_CODE = 'fr' # or 'en' for english, etc. @@ -143,7 +143,7 @@ Modoboa uses `Django's session framework `_ to store per-user information. -Few parameters need to be set in the *settings.py* configuration +Few parameters need to be set in the :file:`settings.py` configuration file to make Modoboa behave as expected:: SESSION_EXPIRE_AT_BROWSER_CLOSE = False # Default value @@ -151,7 +151,7 @@ file to make Modoboa behave as expected:: This parameter is optional but you must ensure it is set to ``False`` (the default value). -The default configuration file provided by the *modoboa-admin.py* +The default configuration file provided by the ``modoboa-admin.py`` command is properly configured. **** @@ -163,7 +163,7 @@ LDAP Authentication ============== -*Modoboa* supports external LDAP authentication using the following extra components: +Modoboa supports external LDAP authentication using the following extra components: * `Python LDAP client `_ * `Django LDAP authentication backend `_ @@ -172,7 +172,7 @@ If you want to use this feature, you must first install those components:: $ pip install python-ldap django-auth-ldap -Then, all you have to do is to modify the *settings.py* file. Add a +Then, all you have to do is to modify the :file:`settings.py` file. Add a new authentication backend to the `AUTHENTICATION_BACKENDS` variable, like this:: @@ -247,7 +247,7 @@ If you need additional parameters, you will find a detailled documentation `here `_. Once the authentication is properly configured, the users defined in -your LDAP directory will be able to connect to *Modoboa*, the associated +your LDAP directory will be able to connect to Modoboa, the associated domain and mailboxes will be automatically created if needed. .. note:: diff --git a/doc/getting_started/install.rst b/doc/getting_started/install.rst index 426f6b89d..1c4f21d6e 100644 --- a/doc/getting_started/install.rst +++ b/doc/getting_started/install.rst @@ -30,8 +30,8 @@ You can choose between two options: * Use the Python package available on the `PyPI `_ * Download the sources tarball -The easiest one is to install it from the *PyPI*. Just run the -following command and you're done:: +The easiest one is to install it from PyPI. Just run the following +command and you're done:: $ pip install modoboa @@ -56,8 +56,8 @@ package. On Debian/Ubuntu:: `virtualenv `_ users ========================================================== -When you deploy an application using *virtualenv*, you may have to -compile some dependencies. For example, *modoboa* relies on *lxml*, +When you deploy an application using virtualenv, you may have to +compile some dependencies. For example, modoboa relies on lxml, which is a C python module. In order to install it, you will need to install the following requirements: @@ -65,7 +65,7 @@ install the following requirements: * libxslt development files * libxml2 development files -On a *Debian* like system, just run the following command:: +On a Debian like system, just run the following command:: $ apt-get install python-dev libxml2-dev libxslt-dev @@ -75,7 +75,7 @@ On a *Debian* like system, just run the following command:: Database ******** -Thanks to *django*, Modoboa supports several databases. Depending on +Thanks to Django, Modoboa supports several databases. Depending on the one you will use, you must install the appropriate python package: * `mysqldb `_ for `MySQL `_ diff --git a/doc/getting_started/plugins.rst b/doc/getting_started/plugins.rst index 5fcfcffb6..cb47c879f 100644 --- a/doc/getting_started/plugins.rst +++ b/doc/getting_started/plugins.rst @@ -50,11 +50,11 @@ This plugin provides a simple management frontend for `amavisd-new The per-domain policies feature only works for new installations. Currently, you can't use modoboa with an existing - database (ie. with data in *users* and *policies* tables). + database (ie. with data in ``users`` and ``policies`` tables). .. note:: - This plugin requires *amavisd-new* version **2.7.0** or higher. If + This plugin requires amavisd-new version **2.7.0** or higher. If you're planning to use the :ref:`selfservice`, you'll need version **2.8.0**. @@ -62,7 +62,7 @@ Database ======== You must tell to Modoboa where it can find the amavis -database. Inside *settings.py*, add a new connection to the +database. Inside :file:`settings.py`, add a new connection to the ``DATABASES`` variable like this:: DATABASES = { @@ -81,7 +81,7 @@ Replace values between ``<>`` with yours. .. note:: - Modoboa doesn't create *amavis* tables. You need to install them + Modoboa doesn't create amavis tables. You need to install them following the `official documentation `_. @@ -106,7 +106,7 @@ Release messages To release messages, first take a look at `this page `_. It -explains how to configure *amavisd-new* to listen somewhere for the +explains how to configure amavisd-new to listen somewhere for the AM.PDP protocol. This protocol is used to send requests. Below is an example of a working configuration:: @@ -126,7 +126,7 @@ Below is an example of a working configuration:: Don't forget to update the ``inet_acl`` list if you plan to release from the network. -Once *amavisd-new* is configured, just tell Modoboa where it can find +Once amavisd-new is configured, just tell Modoboa where it can find the *release server* by modifying the following parameters in the online panel: @@ -212,7 +212,7 @@ the required identifiers. To activate this feature, go the administration panel and set the **Enable self-service mode** parameter to yes. -The last step is to customize the notification messages *amavis* +The last step is to customize the notification messages amavis sends. The most important is to embark a direct link. Take a look at the `README.customize `_ file to learn what you're allowed to do. @@ -229,7 +229,7 @@ Graphical statistics This plugin collects various statistics about emails traffic on your server. It parses a log file to collect information, store it into RRD -files (see `rrdtool `_)and then +files (see `rrdtool `_) and then generates graphics in PNG format. To use it, go to the online parameters panel and adapt the following @@ -273,15 +273,15 @@ Postifx auto-reply messages *************************** This plugin let users define an auto-reply message (*vacation*). It is -based on *postfix* capabilities. +based on Postfix capabilities. The user that executes the autoreply script needs to access -*settings.py*. You must apply proper permissions on this file. For -example, if *settings.py* belongs to *www-data:www-data*, you can add -the *vmail* user to the *www-data* group and set the read permission +:file:`settings.py`. You must apply proper permissions on this file. For +example, if :file:`settings.py` belongs to ``www-data:www-data``, you can add +the ``vmail`` user to the ``www-data`` group and set the read permission for the group. -To make *postfix* use this feature, you need to update your +To make Postfix use this feature, you need to update your configuration files as follows: ``/etc/postfix/main.cf``:: @@ -334,7 +334,7 @@ Two working modes are available: To use this plugin, your hosting setup must include a *ManageSieve* server and your local delivery agent must understand the *Sieve* -language. Don't panic, *Dovecot* supports both :-) (refer to +language. Don't panic, Dovecot supports both :-) (refer to :ref:`dovecot` to know how to enable those features). .. note:: diff --git a/doc/getting_started/upgrade.rst b/doc/getting_started/upgrade.rst index fcf7fc452..9015d9e0a 100644 --- a/doc/getting_started/upgrade.rst +++ b/doc/getting_started/upgrade.rst @@ -56,7 +56,7 @@ been improved. Make sure to consult :ref:`fs_operations`. Configuration file update ------------------------- -Several modifications need to be done into *settings.py*. +Several modifications need to be done into :file:`settings.py`. #. Add the following import statement:: @@ -190,7 +190,7 @@ It is necessary to update the queries used to retrieve users and mailboxes: #. Run ``modoboa-admin.py postfix_maps --dbtype `` and compare the files with those that postfix currently use. Make necessary updates in light of the differences -#. Into *dovecot-sql.conf*, update the ``user_query`` query, refer to +#. Into :file:`dovecot-sql.conf`, update the ``user_query`` query, refer to :ref:`dovecot_mysql_queries` or :ref:`dovecot_pg_queries` #. Update dovecot's configuration to activate the new :ref:`quota related features ` @@ -207,7 +207,7 @@ may encounter the following issues: #. South fails to migrate ``reversion`` - Due to the admin user model change, the script *0001_initial.py* + Due to the admin user model change, the script :file:`0001_initial.py` may fail. Just deactivate ``reversion`` from ``INSTALLED_APPS`` and run the command again. Once done, reactivate ``reversion`` and run the command one last time. @@ -216,7 +216,7 @@ may encounter the following issues: 0.9.4: administrative panel performance improved ================================================ -#. Edit the *settings.py* file and remove +#. Edit the :file:`settings.py` file and remove ``'django.contrib.auth.backends.ModelBackend'`` from the ``AUTHENTICATION_BACKENDS`` variable @@ -229,10 +229,10 @@ For this version, we recommend to install a new instance (see Then, copy the following content from the old installation to the new one: -* The ``media`` directory +* The :file:`media` directory * The directory containing RRD files if you use the :ref:`stats` plugin -Don't copy the old *settings.py* file, just keep the new one and +Don't copy the old :file:`settings.py` file, just keep the new one and modify it (see :ref:`database` and :ref:`timezone_lang`). Migrate your database (see :ref:`latestversion`). @@ -260,16 +260,16 @@ requires a migration. .. note:: Many files have been renamed/removed for this version. I recommend that you backup important files (*settings.py*, etc.) elsewhere - (ie. */tmp* for example). Then, remove the *modoboa* directory, + (ie. :file:`/tmp` for example). Then, remove the :file:`modoboa` directory, extract the new tarball at the same place, rename the new directory - to *modoboa* and copy the files you've just backup into it. + to :file:`modoboa` and copy the files you've just backup into it. .. note:: If the first super administrator you created is named ``admin``, its password will be changed to ``password`` at the end of this upgrade. Don't forget to modify it! -#. Edit the *settings.py* file and update the following variables +#. Edit the :file:`settings.py` file and update the following variables (just copy/paste their new content):: MIDDLEWARE_CLASSES = ( @@ -326,10 +326,10 @@ requires a migration. $ ./manage.py collectstatic #. If you are using the *stats* extension, please rename the - */static/stats* directory to */media/stats* + :file:`/static/stats` directory to :file:`/media/stats` and change the value of the ``IMG_ROOTDIR`` parameter (go to the adminstration panel) -#. Restart the python instance(s) that serve *Modoboa* +#. Restart the python instance(s) that serve Modoboa #. Log into Modoboa, go to *Modoboa > Extensions*, uncheck all extensions, save. Then, check the extensions you want to use and @@ -339,7 +339,7 @@ requires a migration. (see :ref:`webservers`) #. **For Dovecot users only**, you need to modify the - ``password_query`` (file */etc/dovecot/dovecot-sql.conf* by default + ``password_query`` (file :file:`/etc/dovecot/dovecot-sql.conf` by default on a Debian system) like this:: password_query = SELECT email AS user, password FROM auth_user WHERE email='%u' @@ -347,7 +347,7 @@ requires a migration. 0.8.8: CSV import feature and minor fixes ========================================= -#. Edit the *settings.py* file and add +#. Edit the :file:`settings.py` file and add ``'modoboa.lib.middleware.AjaxLoginRedirect'`` to the ``MIDDLEWARE_CLASSES`` variable like this:: @@ -362,7 +362,7 @@ requires a migration. 'modoboa.extensions.webmail.middleware.WebmailErrorMiddleware', ) -#. Still inside *settings.py*, modify the ``DATABASE_ROUTERS`` +#. Still inside :file:`settings.py`, modify the ``DATABASE_ROUTERS`` variable like this:: DATABASE_ROUTERS = ["modoboa.extensions.amavis_quarantine.dbrouter.AmavisRouter"] @@ -371,7 +371,7 @@ requires a migration. 0.8.7: per-user language selection ================================== -#. Edit the *settings.py* file and add the +#. Edit the :file:`settings.py` file and add the ``'django.middleware.locale.LocaleMiddleware'`` middleware to the ``MIDDLEWARE_CLASSES`` variable like this:: @@ -404,7 +404,7 @@ requires a migration. ========================================================= #. Just update your configuration if you are using the quarantine - plugin. Open *settings.py*, move the database configuration from + plugin. Open :file:`settings.py`, move the database configuration from the ``DB_CONNECTIONS`` variable to the ``DATABASES`` variable, like this:: @@ -426,7 +426,7 @@ requires a migration. DATABASE_ROUTERS = ["modoboa.extensions.amavis_quarantine.dbrouter.AmavisRouter"] -#. Remove the deprecated ``DB_CONNECTIONS`` variable from *settings.py*. +#. Remove the deprecated ``DB_CONNECTIONS`` variable from :file:`settings.py`. 0.8.5: new "Sieve filters" plugin, improved admin app ===================================================== @@ -437,7 +437,7 @@ requires a migration. $ python manage.py migrate admin #. Add ``modoboa.auth`` and ``modoboa.extensions.sievefilters`` to the - ``INSTALLED_APPS`` variable in *settings.py*. + ``INSTALLED_APPS`` variable in :file:`settings.py`. #. Go the *Settings/Extensions* panel, deactivate and activate your extensions, it will update all the symbolic links. @@ -445,7 +445,7 @@ requires a migration. 0.8.4: folders manipulation support (webmail) and bugfixes ========================================================== -#. Update the ``MIDDLEWARE_CLASSES`` variable in *settings.py*:: +#. Update the ``MIDDLEWARE_CLASSES`` variable in :file:`settings.py`:: MIDDLEWARE_CLASSES = ( 'django.middleware.common.CommonMiddleware', @@ -460,7 +460,7 @@ requires a migration. extensions, it will update all the symbolic links to the new format. #. Optional: update the ``DATABASES`` and ``TEMPLATE_LOADERS`` - variables in *settings.py* to remove warning messages (appearing with + variables in :file:`settings.py` to remove warning messages (appearing with Django 1.3):: DATABASES = { @@ -482,14 +482,14 @@ requires a migration. 0.8.3: admin application refactoring and more ============================================= -#. Migrate the *admin* application:: +#. Migrate the ``admin`` application:: $ python manage.py migrate admin #. Update SQL queries used in your environnement (see :ref:`postfix` or :ref:`dovecot`). -#. Update *postfix* configuration so that it can handle domain aliases +#. Update Postfix configuration so that it can handle domain aliases (see :ref:`postfix`). @@ -502,9 +502,9 @@ requires a migration. #. Update your config file and add all extensions to ``INSTALLED_APPS`` (even those you are not going to use). -#. Inside the */templates/* directory, remove all symbolic links. -#. Download the latest release of ckeditor and extract it into */static/js/*. It should create a new directory named *ckeditor*. -#. Update the following variables inside *settings.py*:: +#. Inside the :file:`/templates/` directory, remove all symbolic links. +#. Download the latest release of ckeditor and extract it into :file:`/static/js/`. It should create a new directory named ``ckeditor``. +#. Update the following variables inside :file:`settings.py`:: MEDIA_ROOT = os.path.join(MODOBOA_DIR, 'static') MEDIA_URL = '/static/' @@ -518,9 +518,9 @@ requires a migration. 0.8.1 : project renamed ======================= -#. First, rename the *mailng* directory to *modoboa* and copy all the - content from *modoboa-0.8.1* to *modoboa*. -#. Edit *settings.py* and replace all occurences of mailng by +#. First, rename the ``mailng`` directory to ``modoboa`` and copy all the + content from ``modoboa-0.8.1`` to ``modoboa``. +#. Edit :file:`settings.py` and replace all occurences of mailng by modoboa. Make sure you don't modify the ``DATABASE`` section as you're not going to rename your database. #. Rename the ``MAILNG_DIR`` variable to ``MODOBOA_DIR``. @@ -554,7 +554,7 @@ Before you start the migration, make sure you have updated your 'mailng.userprefs', ) -Starting with 0.8, mailng.main doesn't exist anymore. You must remove +Starting with 0.8, ``mailng.main`` doesn't exist anymore. You must remove it from your ``INSTALLED_APPS``. Finally, run the following commands:: diff --git a/doc/integration/imap_and_smtp.rst b/doc/integration/imap_and_smtp.rst index 3280b5af2..50d396112 100644 --- a/doc/integration/imap_and_smtp.rst +++ b/doc/integration/imap_and_smtp.rst @@ -12,12 +12,12 @@ Modoboa works better with Dovecot 2.0 so the following documentation is suitable for this combination. In this section, we assume dovecot's configuration resides in -*/etc/dovecot*, all pathes will be relative to this directory. +:file:`/etc/dovecot`, all pathes will be relative to this directory. Mailboxes ========= -First, edit the *conf.d/10-mail.conf* and set the ``mail_location`` +First, edit the :file:`conf.d/10-mail.conf` and set the ``mail_location`` variable:: # maildir @@ -63,7 +63,7 @@ stored (see :ref:`admin-params` to activate this feature). Those operations are treated asynchronously by a cron script. For example, when you rename an e-mail address through the web UI, the associated mailbox on the file system is not modified -directly. Instead of that, a 'rename' order is created for this +directly. Instead of that, a *rename* order is created for this mailbox. The mailbox will be considered unavailable until the order is not executed (see :ref:`Postfix configuration `). @@ -82,7 +82,7 @@ And add the following line inside:: .. warning:: The user running the cron script must have access to the - *settings.py* file of the modoboa instance. + :file:`settings.py` file of the modoboa instance. The result of each order is recorded into Modoboa's log. Go to *Modoboa > Logs* to consult them. @@ -91,7 +91,7 @@ The result of each order is recorded into Modoboa's log. Go to Authentication ============== -To make the authentication work, edit the *conf.d/10-auth.conf* and +To make the authentication work, edit the :file:`conf.d/10-auth.conf` and uncomment the following line at the end:: #!include auth-system.conf.ext @@ -103,7 +103,7 @@ uncomment the following line at the end:: #!include auth-static.conf.ext -Then, edit the *conf.d/auth-sql.conf.ext* file and add the following +Then, edit the :file:`conf.d/auth-sql.conf.ext` file and add the following content inside:: passdb sql { @@ -120,13 +120,13 @@ content inside:: Make sure to activate only one backend (per type) inside your configuration (just comment the other ones). -Edit the *dovecot-sql.conf.ext* and modify the configuration according +Edit the :file:`dovecot-sql.conf.ext` and modify the configuration according to your database engine. .. _dovecot_mysql_queries: -*MySQL* users -------------- +MySQL users +----------- :: @@ -144,8 +144,8 @@ to your database engine. .. _dovecot_pg_queries: -*PostgreSQL* users ------------------- +PostgreSQL users +---------------- :: @@ -169,7 +169,7 @@ LDA === The LDA is activated by default but you must define a *postmaster* -address. Open the *conf.d/15-lda.conf* file modify the following line:: +address. Open the :file:`conf.d/15-lda.conf` file modify the following line:: postmaster_address = postmaster@ @@ -182,12 +182,12 @@ Modoboa lets adminstrators define per-domain and/or per-account limits (quota). It also lists the current quota usage of each account. Those features require Dovecot to be configured in a specific way. -Inside *conf.d/10-mail.conf*, add the ``quota`` plugin to the default +Inside :file:`conf.d/10-mail.conf`, add the ``quota`` plugin to the default activated ones:: mail_plugins = quota -Inside *conf.d/10-master.conf*, update the *dict* service to set +Inside :file:`conf.d/10-master.conf`, update the ``dict`` service to set proper permissions:: service dict { @@ -200,7 +200,7 @@ proper permissions:: } } -Inside *conf.d/20-imap.conf*, activate the ``imap_quota`` plugin:: +Inside :file:`conf.d/20-imap.conf`, activate the ``imap_quota`` plugin:: protocol imap { # ... @@ -210,13 +210,13 @@ Inside *conf.d/20-imap.conf*, activate the ``imap_quota`` plugin:: # ... } -Inside *dovecot.conf*, activate the quota SQL dictionary backend:: +Inside :file:`dovecot.conf`, activate the quota SQL dictionary backend:: dict { quota = :/etc/dovecot/dovecot-dict-sql.conf.ext } -Inside *conf.d/90-quota.conf*, activate the *quota dictionary* backend:: +Inside :file:`conf.d/90-quota.conf`, activate the *quota dictionary* backend:: plugin { quota = dict:User quota::proxy::quota @@ -224,7 +224,8 @@ Inside *conf.d/90-quota.conf*, activate the *quota dictionary* backend:: It will tell Dovecot to keep quota usage in the SQL dictionary. -Finally, edit the *dovecot-dict-sql.conf.ext* file and put the following content inside:: +Finally, edit the :file:`dovecot-dict-sql.conf.ext` file and put the +following content inside:: connect = host= dbname= user= password= @@ -247,9 +248,9 @@ Finally, edit the *dovecot-dict-sql.conf.ext* file and put the following content Database schema update ^^^^^^^^^^^^^^^^^^^^^^ -The `admin_quota` table is created by *Django* but unfortunately it -doesn't support `DEFAULT` constraints (it only simulates them when the -ORM is used). As *PostgreSQL* is a bit strict about constraint +The ``admin_quota`` table is created by Django but unfortunately it +doesn't support ``DEFAULT`` constraints (it only simulates them when the +ORM is used). As PostgreSQL is a bit strict about constraint violations, you must execute the following query manually:: db=> ALTER TABLE admin_quota ALTER COLUMN bytes SET DEFAULT 0; @@ -318,8 +319,8 @@ work for Modoboa. You should use the following one instead: CREATE TRIGGER setmboxid AFTER INSERT ON admin_quota FOR EACH ROW EXECUTE PROCEDURE set_mboxid(); -Copy this example into a file (for example: *quota-trigger.sql*) on -server running *postgres* and execute the following commands:: +Copy this example into a file (for example: :file:`quota-trigger.sql`) on +server running postgres and execute the following commands:: $ su - postgres $ psql < /path/to/quota-trigger.sql @@ -332,7 +333,7 @@ For existing installations, *Dovecot* (> 2) offers a command to recalculate the current quota usages. For example, if you want to update all usages, run the following command:: - $ doveadmin quota recalc -A + $ doveadm quota recalc -A Be carefull, it can take a while to execute. @@ -342,7 +343,7 @@ ManageSieve/Sieve Modoboa lets users define filtering rules from the web interface. To do so, it requires *ManageSieve* to be activated on your server. -Inside *conf.d/20-managesieve.conf*, make sure the following lines are +Inside :file:`conf.d/20-managesieve.conf`, make sure the following lines are uncommented:: protocols = $protocols sieve @@ -361,7 +362,7 @@ uncommented:: Messages filtering using Sieve is done by the LDA. -Inside *conf.d/15-lda.conf*, activate the ``sieve`` plugin like this:: +Inside :file:`conf.d/15-lda.conf`, activate the ``sieve`` plugin like this:: protocol lda { # Space separated list of plugins to load (default is global mail_plugins). @@ -369,7 +370,7 @@ Inside *conf.d/15-lda.conf*, activate the ``sieve`` plugin like this:: } Finally, configure the ``sieve`` plugin by editing the -*conf.d/90-sieve.conf* file. Put the follwing content inside:: +:file:`conf.d/90-sieve.conf` file. Put the follwing caontent inside:: plugin { # Location of the active script. When ManageSieve is used this is actually @@ -382,7 +383,7 @@ Finally, configure the ``sieve`` plugin by editing the sieve_dir = ~/sieve } -Restart *Dovecot*. +Restart Dovecot. .. _postfix: @@ -398,22 +399,22 @@ Map files ========= You first need to create configuration files (or map files) that will -be used by *postfix* to lookup into Modoboa tables. +be used by Postfix to lookup into Modoboa tables. To automaticaly generate the requested map files and store them in a directory, run the following command:: $ modoboa-admin.py postfix_maps --dbtype mapfiles -``mapfiles`` is the directory where the files will be stored. Answer the -few questions and you're done. +:file:`mapfiles` is the directory where the files will be +stored. Answer the few questions and you're done. .. _postfix_config: Configuration ============= -Use the following configuration in the */etc/postfix/main.cf* file +Use the following configuration in the :file:`/etc/postfix/main.cf` file (this is just one possible configuration):: # Stuff before @@ -442,10 +443,10 @@ Use the following configuration in the */etc/postfix/main.cf* file # Stuff after -Then, edit the */etc/postfix/master.cf* file and add the following +Then, edit the :file:`/etc/postfix/master.cf` file and add the following definition at the end:: dovecot unix - n n - - pipe flags=DRhu user=vmail:vmail argv=/usr/lib/dovecot/deliver -f ${sender} -d ${recipient} -Restart *Postfix*. +Restart Postfix. diff --git a/doc/integration/web_servers.rst b/doc/integration/web_servers.rst index 639aba65b..2c2d11185 100644 --- a/doc/integration/web_servers.rst +++ b/doc/integration/web_servers.rst @@ -10,18 +10,19 @@ Web servers Apache2 ******* -.. note:: The following instructions are meant to help you get your - site up and running quickly. However it is not possible for - the people contributing documentation to Modoboa to test - every single combination of web server, wsgi server, - distribution, etc. So it is possible that **your** - installation of uwsgi or nginx or Apache or what-have-you - works differently. Keep this in mind. +.. note:: + + The following instructions are meant to help you get your site up + and running quickly. However it is not possible for the people + contributing documentation to Modoboa to test every single + combination of web server, wsgi server, distribution, etc. So it is + possible that **your** installation of uwsgi or nginx or Apache or + what-have-you works differently. Keep this in mind. mod_wgsi ======== -First, make sure that *mod_wsgi* is installed on your server. +First, make sure that mod_wsgi is installed on your server. Create a new virtualhost in your Apache configuration and put the following content inside:: @@ -48,8 +49,8 @@ following content inside:: This is just one possible configuration. .. note:: - *Django* 1.3 users, please consult this `page `_, - it contains an example *wsgi.py* file. + Django 1.3 users, please consult this `page `_, + it contains an example :file:`wsgi.py` file. .. note:: You will certainly need more configuration in order to launch @@ -58,7 +59,7 @@ This is just one possible configuration. mod_python ========== -First, make sure that *mod_python* is installed on your server. +First, make sure that mod_python is installed on your server. Create a new virtualhost in your Apache configuration and put the following content inside:: @@ -97,13 +98,14 @@ This is just one possible configuration. Nginx ***** -.. note:: The following instructions are meant to help you get your - site up and running quickly. However it is not possible for - the people contributing documentation to Modoboa to test - every single combination of web server, wsgi server, - distribution, etc. So it is possible that **your** - installation of uwsgi or nginx or Apache or what-have-you - works differently. Keep this in mind. +.. note:: + + The following instructions are meant to help you get your site up + and running quickly. However it is not possible for the people + contributing documentation to Modoboa to test every single + combination of web server, wsgi server, distribution, etc. So it is + possible that **your** installation of uwsgi or nginx or Apache or + what-have-you works differently. Keep this in mind. Green Unicorn ============= @@ -116,7 +118,7 @@ performance is really good with this configuration. To use this setup, first download and install `nginx `__ and `gunicorn `_. Then, use the following sample -*gunicorn* configuration (create a new file named *gunicorn.conf.py* +gunicorn configuration (create a new file named :file:`gunicorn.conf.py` inside Modoboa's root dir):: backlog = 2048 @@ -133,7 +135,7 @@ To start gunicorn, execute the following commands:: $ cd $ gunicorn -c gunicorn.conf.py .wsgi:application -Now the *nginx* part. Just create a new virtual host and use the +Now the nginx part. Just create a new virtual host and use the following configuration:: upstream modoboa { @@ -167,7 +169,7 @@ following configuration:: proxy_set_header Host $http_host; proxy_redirect off; proxy_set_header X-Forwarded-Protocol ssl; - proxy_pass http://modoboa; + proxy_pass http://modoboa; } } @@ -186,7 +188,7 @@ key. `This article contains information about how to do it. Paste this content to your configuration (replace values between -``<>`` with yours), restart *nginx* and enjoy a really fast +``<>`` with yours), restart nginx and enjoy a really fast application! uwsgi @@ -199,13 +201,14 @@ optimize their configuration for your site. The Django documentation includes the following warning regarding uwsgi: -.. warning:: Some distributions, including Debian and Ubuntu, ship an - outdated version of uWSGI that does not conform to the - WSGI specification. Versions prior to 1.2.6 do not call - close on the response object after handling a request. In - those cases the request_finished signal isn’t sent. This - can result in idle connections to database and memcache - servers. +.. warning:: + + Some distributions, including Debian and Ubuntu, ship an outdated + version of uWSGI that does not conform to the WSGI + specification. Versions prior to 1.2.6 do not call close on the + response object after handling a request. In those cases the + request_finished signal isn’t sent. This can result in idle + connections to database and memcache servers. Use uwsgi 1.2.6 or newer. If you do not, you *will* run into problems. Modoboa will fail in obscure ways.