Upgrade
WARNING
A new release may need to modify your database. Before you start, make sure to backup everything.
Most of the time, upgrading modoboa-pro only requires a few actions. In every case, first apply the specific instructions of each version between your current one and the one you are installing (if any), and then apply the general procedure below.
INFO
As in the installation guide, <modoboa_instance> is the directory that contains your instance's manage.py and <venv> is the Python virtual environment Modoboa runs in. The private package index must be configured as described in step 1.
General procedure
Run the following commands:
$ <venv>/bin/pip install modoboa-pro==<VERSION>
$ cd <modoboa_instance>
$ <venv>/bin/python manage.py migrate # apply any new migrations
$ <venv>/bin/python manage.py collectstatic --noinput # refresh frontend assets
$ systemctl restart modoboa # web / uwsgi
$ systemctl restart modoboa-rq # background workersWARNING
pip install alone does not refresh the files your web server serves — they live in STATIC_ROOT and are only updated by collectstatic. Skipping it leaves the old remoteEntry.js in place, which breaks the frontend (see the caching note in step 7 of the installation guide).
After upgrading, also remember the fixed-filename caching caveat: if you did not apply the no-cache rule, browsers and CDNs may still serve the old remoteEntry.js. A hard refresh (Ctrl+Shift+R) confirms the diagnosis; the Cache-Control rule (or a CDN purge) fixes it for end users who cannot clear their cache.
The list of changes brought by each release is available in the changelog.
Specific instructions
The sections below contain the specific steps required to upgrade to a given version. Versions not listed here only need the general procedure.
Version 1.2.0
This release adds shared mailboxes. Before running the general procedure:
- Upgrade Modoboa to 2.12.0 or later, and enable IMAP folder sharing in Dovecot (see Requirements).
- Add
"modoboa_pro.sharedmailboxes"toMODOBOA_APPS(see step 2 of the installation guide). - Register the
reconcile_shared_mailboxescron job in yourcron_config.py(see Cron jobs), then restart the RQ scheduler. - Make sure a worker runs the
dovecotqueue: the rights of the members are applied by its jobs.