<commit_before>##################################
Upgrading an existing installation
##################################

This section contains all the upgrade procedures required to use
newest versions of Modoboa.

.. note::
   Before running a migration, we recommend that you make
   a copy of your existing database.

.. _latestversion:

**************
Latest version
**************

.. warning::

   If you use a version **prior to 0.9.5**, please migrate in two
   steps:
   
   #. first migrate to 0.9.5 
   #. then migrate to the latest version

   If you try to migrate directly, the operation will fail.

Starting with version 0.9.1, Modoboa comes as a standard django
application. Fetch the latest version (see :ref:`get_modoboa`) and
install it.

``pip`` users, just run the following command::

  $ pip install --upgrade modoboa

.. warning::

   If you migrate to **1.1.0**, please follow the :ref:`dedicated migration
   procedure <1.1.0>` and skip the usual one.

Then, refer to this page to check if the version you're installing
requires specific operations. If the version you're looking for is not
present, it means nothing special is required.

Finally, follow the common procedure::

  $ cd <modoboa_instance_dir>
  $ python manage.py syncdb --migrate
  $ python manage.py collectstatic

1.1.6: Few bugfixes
===================

Catchall aliases were not really functional until this version as they
were eating all domain traffic.

To fix them, a postfix map file (``sql-mailboxes-self-aliases.cf``)
has been re-introduced and must be listed into the
``virtual_alias_maps`` setting. See :ref:`postfix_config` for the
order.

1.1.2: Audit trail issues
=========================

Update the :file:`settings.py` file as follows:

#. Remove the ``'reversion.middleware.RevisionMiddleware'``
   middleware from the ``MIDDLEWARE_CLASSES`` variable
<commit_msg>Restart uwsgi to finish the upgrade.<commit_after>##################################
Upgrading an existing installation
##################################

This section contains all the upgrade procedures required to use
newest versions of Modoboa.

.. note::
   Before running a migration, we recommend that you make
   a copy of your existing database.

.. _latestversion:

**************
Latest version
**************

.. warning::

   If you use a version **prior to 0.9.5**, please migrate in two
   steps:
   
   #. first migrate to 0.9.5 
   #. then migrate to the latest version

   If you try to migrate directly, the operation will fail.

Starting with version 0.9.1, Modoboa comes as a standard django
application. Fetch the latest version (see :ref:`get_modoboa`) and
install it.

``pip`` users, just run the following command::

  $ pip install --upgrade modoboa

.. warning::

   If you migrate to **1.1.0**, please follow the :ref:`dedicated migration
   procedure <1.1.0>` and skip the usual one.

Then, refer to this page to check if the version you're installing
requires specific operations. If the version you're looking for is not
present, it means nothing special is required.

Finally, follow the common procedure::

  $ cd <modoboa_instance_dir>
  $ python manage.py syncdb --migrate
  $ python manage.py collectstatic
  $ service uwsgi restart

1.1.6: Few bugfixes
===================

Catchall aliases were not really functional until this version as they
were eating all domain traffic.

To fix them, a postfix map file (``sql-mailboxes-self-aliases.cf``)
has been re-introduced and must be listed into the
``virtual_alias_maps`` setting. See :ref:`postfix_config` for the
order.

1.1.2: Audit trail issues
=========================

Update the :file:`settings.py` file as follows:

#. Remove the ``'reversion.middleware.RevisionMiddleware'``
   middleware from the ``MIDDLEWARE_CLASSES`` variable

{'fraction_non_alphanumeric': 0.1483820047355959, 'fraction_numerical': 0.011049723756906077, 'mean_word_length': 4.244137931034483, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7534097', 'n_tokens_mistral': 1099, 'n_tokens_neox': 1042, 'n_words': 460}