From 54e7d7e88892cdae2da85334ffeb83d67dd67cab Mon Sep 17 00:00:00 2001 From: Spitap Date: Wed, 30 Aug 2023 11:01:29 +0200 Subject: [PATCH] updated doc --- doc/manual_installation/dovecot.rst | 49 +++++++++++++++++------------ doc/manual_installation/modoboa.rst | 8 +++-- doc/upgrade.rst | 26 ++++++++++++--- 3 files changed, 56 insertions(+), 27 deletions(-) diff --git a/doc/manual_installation/dovecot.rst b/doc/manual_installation/dovecot.rst index f0e5a8227..2cc717989 100644 --- a/doc/manual_installation/dovecot.rst +++ b/doc/manual_installation/dovecot.rst @@ -171,20 +171,25 @@ For debian and derivative, you need to install mysql connector for dovecot:: default_pass_scheme = CRYPT + user_query = \ + SELECT '%{home_dir}/%%d/%%n' AS home, %mailboxes_owner_uid as uid, \ + %mailboxes_owner_gid as gid, \ + CONCAT('*:bytes=', mb.quota, 'M') AS quota_rule \ + FROM admin_mailbox mb \ + INNER JOIN admin_domain dom ON mb.domain_id=dom.id \ + INNER JOIN core_user u ON u.id=mb.user_id \ + WHERE (mb.is_send_only=0 OR '%s' NOT IN ('imap', 'pop3', 'lmtp')) \ + AND mb.address='%%n' AND dom.name='%%d' + password_query = \ - SELECT email AS user, password \ + SELECT email AS user, password, '%{home_dir}/%%d/%%n' AS userdb_home, \ + %mailboxes_owner_uid AS userdb_uid, %mailboxes_owner_gid AS userdb_gid, \ + CONCAT('*:bytes=', mb.quota, 'M') AS userdb_quota_rule \ FROM core_user u \ INNER JOIN admin_mailbox mb ON u.id=mb.user_id \ INNER JOIN admin_domain dom ON mb.domain_id=dom.id \ - WHERE u.email='%L{user}' AND u.is_active=1 AND dom.enabled=1 - - user_query = \ - SELECT '/%Ld/%Ln' AS home, \ - as uid, as gid, CONCAT('*:bytes=', mb.quota, 'M') AS quota_rule \ - FROM admin_mailbox mb \ - INNER JOIN admin_domain dom ON mb.domain_id=dom.id \ - INNER JOIN core_user u ON mb.user_id=u.id \ - WHERE mb.address='%L{username}' AND dom.name='%L{domain}' AND u.is_active=1 AND dom.enabled=1 + WHERE (mb.is_send_only=0 OR '%s' NOT IN ('imap', 'pop3')) \ + AND u.email='%%u' AND u.is_active=1 AND dom.enabled=1 iterate_query = SELECT email AS user FROM core_user WHERE is_active @@ -204,20 +209,24 @@ For debian and derivative, you need to install postgres connector for dovecot:: default_pass_scheme = CRYPT + user_query = \ + SELECT '%{home_dir}/%%d/%%n' AS home, %mailboxes_owner_uid as uid, \ + %mailboxes_owner_gid as gid, '*:bytes=' || mb.quota || 'M' AS quota_rule \ + FROM admin_mailbox mb \ + INNER JOIN admin_domain dom ON mb.domain_id=dom.id \ + INNER JOIN core_user u ON u.id=mb.user_id \ + WHERE (mb.is_send_only IS NOT TRUE OR '%s' NOT IN ('imap', 'pop3', 'lmtp')) \ + AND mb.address='%%n' AND dom.name='%%d' + password_query = \ - SELECT email AS user, password \ + SELECT email AS user, password, '%{home_dir}/%%d/%%n' AS userdb_home, \ + %mailboxes_owner_uid AS userdb_uid, %mailboxes_owner_gid AS userdb_gid, \ + CONCAT('*:bytes=', mb.quota, 'M') AS userdb_quota_rule \ FROM core_user u \ INNER JOIN admin_mailbox mb ON u.id=mb.user_id \ INNER JOIN admin_domain dom ON mb.domain_id=dom.id \ - WHERE u.email='%L{user}' AND u.is_active AND dom.enabled - - user_query = \ - SELECT '/%Ld/%Ln' AS home, \ - as uid, as gid, CONCAT('*:bytes=', mb.quota, 'M') AS quota_rule \ - FROM admin_mailbox mb \ - INNER JOIN admin_domain dom ON mb.domain_id=dom.id \ - INNER JOIN core_user u ON mb.user_id=u.id \ - WHERE mb.address='%L{username}' AND dom.name='%L{domain}' AND u.is_active AND dom.enabled + WHERE (mb.is_send_only IS NOT TRUE OR '%s' NOT IN ('imap', 'pop3'))\ + AND email='%%u' AND is_active AND dom.enabled iterate_query = SELECT email AS user FROM core_user WHERE is_active diff --git a/doc/manual_installation/modoboa.rst b/doc/manual_installation/modoboa.rst index 66b1df231..9cfea6a91 100644 --- a/doc/manual_installation/modoboa.rst +++ b/doc/manual_installation/modoboa.rst @@ -311,11 +311,13 @@ But we recommend an automatic start using ``systemd`` or .. sourcecode:: ini - [program:modoboa-worker] + [program:modoboa-dkim-worker] autostart=true autorestart=true - command=/srv/modoboa/env/bin/python /srv/modoboa/instance/manage.py worker high default low - directory=/srv/modoboa + command= /manage.py rqworker dkim + directory= + user= + redirect_stderr=true numprocs=1 stopsignal=TERM diff --git a/doc/upgrade.rst b/doc/upgrade.rst index f3dbed168..cbd719b57 100644 --- a/doc/upgrade.rst +++ b/doc/upgrade.rst @@ -55,6 +55,24 @@ Make sure to use root privileges and run the following command: Then, reload postfix. + +Updating the installer +====================== + +It is important to keep the installer updated because it works on rolling release. +To do that, go to modoboa-installer directory then: + +.. sourcecode:: bash + + > git fetch && git pull + +If some error appears, you may try this: + +.. sourcecode:: bash + + > git reset --hard origin/master + + New-admin interface =================== @@ -117,10 +135,10 @@ Specific instructions ===== .. note:: - This version has not been released yet. - -.. note:: - If you use the installer to perform the upgrade, you only need to edit ``urls.py`` and ``settings.py`` + If you use the installer to perform the upgrade, you NEED to update it. + See above for instructions. + After updating the installer and modoboa with it, + you only need to edit ``urls.py`` and ``settings.py`` * Django has been updated to 4.2LTS. Please upgrade all your extensions alongside modoboa * Support for Python 3.7 has been dropped, minimum Python version is now 3.8