diff --git a/doc/features/imap-migration.rst b/doc/features/imap-migration.rst index ad062c266..64b96742d 100644 --- a/doc/features/imap-migration.rst +++ b/doc/features/imap-migration.rst @@ -28,7 +28,25 @@ configuration file with the command: > python manage.py generate_offlineimap_config You then need to setup `OfflineIMAP `_. - .. + +The synchronization script must be configured to run periodically on +your new server. Since it will copy mailboxes content to its final +destination, filesystem permissions must be respected. To do that, it +must be executed by the user which owns mailboxes (generally +``vmail``). + +Here is a configuration example where the script is executed every +hours. You can copy it inside the ``/etc/cron.d/modoboa`` file: + +.. sourcecode:: shell + + PYTHON=/srv/modoboa/env/bin/python + INSTANCE=/srv/modoboa/instance + + 0 */1 * * * vmail cd /srv/vmail && $PYTHON $INSTANCE/manage.py generate_offlineimap_config --output .offlineimaprc && /usr/local/bin/offlineimap > /dev/null 2>&1 + +Feel free to adapt it. + This will sync back-and-forth user mailbox. diff --git a/doc/upgrade.rst b/doc/upgrade.rst index 234fd2833..9a7a29999 100644 --- a/doc/upgrade.rst +++ b/doc/upgrade.rst @@ -154,6 +154,19 @@ to ``MODOBOA_APPS``: And remove any reference to ``'modoboa_dmarc'``, ``'modoboa_pdfcredentials'`` or ``'modoboa_imap_migration'`` in this same variable. +You need to add ``'modoboa_imap_migration.auth_backends.IMAPBackend',`` at the end of ``AUTHENTICATION_BACKENDS``: + +.. sourcecode:: python + + AUTHENTICATION_BACKENDS = ( + 'django.contrib.auth.backends.ModelBackend', + 'modoboa_imap_migration.auth_backends.IMAPBackend', + ) + +.. note:: + It won't affect login if you don't use ``imap_migration`` feature. + It is therefor highly recommended to add this authentication backend. + After upgrading modoboa, run the following commands from your virtual environment: .. sourcecode:: bash