[GH-ISSUE #939] Help with upgrading Modoboa on Debian #806

Closed
opened 2026-02-27 11:13:38 +03:00 by kerem · 26 comments
Owner

Originally created by @abmiller99 on GitHub (Oct 13, 2016).
Original GitHub issue: https://github.com/modoboa/modoboa/issues/939

I'm not experienced with Python, Postgre.

I have Modoboa 1.6.0 running on my mailserver . My install method was the 'easy', Python script method:

$ git clone https://github.com/modoboa/modoboa-installer
$ cd modoboa-installer
$ sudo ./run.py <mail server hostname>

I have read the docs describing how to update modoboa with new version, but I'm stuck on the deploy instructions.

Example from the docs:
$ modoboa-admin.py deploy modoboa_example --collectstatic [--dburl default:database-url] [--extensions extensions]

What do I replace modoboa_example with?

How do I determine my --dburl values?

Any help is very appreciated!

Originally created by @abmiller99 on GitHub (Oct 13, 2016). Original GitHub issue: https://github.com/modoboa/modoboa/issues/939 I'm not experienced with Python, Postgre. I have Modoboa 1.6.0 running on my mailserver . My install method was the 'easy', Python script method: `$ git clone https://github.com/modoboa/modoboa-installer` `$ cd modoboa-installer` `$ sudo ./run.py <mail server hostname>` I have read the [docs](http://modoboa.readthedocs.io/en/latest/getting_started/upgrade.html) describing how to update modoboa with new version, but I'm stuck on the `deploy` instructions. Example from the docs: `$ modoboa-admin.py deploy modoboa_example --collectstatic [--dburl default:database-url] [--extensions extensions]` What do I replace `modoboa_example` with? How do I determine my `--dburl` values? Any help is very appreciated!
kerem closed this issue 2026-02-27 11:13:38 +03:00
Author
Owner

@tonioo commented on GitHub (Oct 13, 2016):

Hi,
in your case, the easiest way to upgrade is the following one:

> su - modoboa
> source env/bin/activate
> cd instance
> python manage.py migrate
> python manage.py collectstatic

Then, just follow the 1.6.1 instructions as described in the weblog post.

<!-- gh-comment-id:253510250 --> @tonioo commented on GitHub (Oct 13, 2016): Hi, in your case, the easiest way to upgrade is the following one: ``` bash > su - modoboa > source env/bin/activate > cd instance > python manage.py migrate > python manage.py collectstatic ``` Then, just follow the 1.6.1 instructions as described in the weblog post.
Author
Owner

@abmiller99 commented on GitHub (Oct 13, 2016):

Here is the result of the commands you provided:

$ su - modoboa

$ source env/bin/activate
-su: 1: source: not found

$ cd instance

$ python manage.py migrate

Traceback (most recent call last):
File "manage.py", line 10, in <module>
    execute_from_command_line(sys.argv)
File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 353, in execute_from_command_line
utility.execute()
File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 302, in execute
settings.INSTALLED_APPS
File "/usr/local/lib/python2.7/dist-packages/django/conf/__init__.py", line 55, in __getattr__
self._setup(name)
File "/usr/local/lib/python2.7/dist-packages/django/conf/__init__.py", line 43, in _setup
self._wrapped = Settings(settings_module)
File "/usr/local/lib/python2.7/dist-packages/django/conf/__init__.py", line 99, in __init__
mod = importlib.import_module(self.SETTINGS_MODULE)
File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
    __import__(name)
File "/srv/modoboa/instance/instance/settings.py", line 250, in <module>
    from modoboa_amavis.settings import *
ImportError: No module named modoboa_amavis.settings

$ python manage.py collectstatic

Traceback (most recent call last):
 File "manage.py", line 10, in <module>
    execute_from_command_line(sys.argv)
File "/usr/local/lib/python2.7/dist-packages/django/core/managemen/__init__.py", line 353, in execute_from_command_line
    utility.execute()
  File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 302, in execute
    settings.INSTALLED_APPS
  File "/usr/local/lib/python2.7/dist-packages/django/conf/__init__.py", line 55, in __getattr__
    self._setup(name)
  File "/usr/local/lib/python2.7/dist-packages/django/conf/__init__.py", line 43, in _setup
    self._wrapped = Settings(settings_module)
  File "/usr/local/lib/python2.7/dist-packages/django/conf/__init__.py", line 99, in __init__
    mod = importlib.import_module(self.SETTINGS_MODULE)
  File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
    __import__(name)
  File "/srv/modoboa/instance/instance/settings.py", line 250, in <module>
    from modoboa_amavis.settings import *
ImportError: No module named modoboa_amavis.settings

Any insights?

My environment: Debian 8 (Jessie)

screen shot 2016-10-13 at 14 48 06

<!-- gh-comment-id:253518114 --> @abmiller99 commented on GitHub (Oct 13, 2016): Here is the result of the commands you provided: `$ su - modoboa` ``` $ source env/bin/activate -su: 1: source: not found ``` `$ cd instance` `$ python manage.py migrate` ``` Traceback (most recent call last): File "manage.py", line 10, in <module> execute_from_command_line(sys.argv) File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 353, in execute_from_command_line utility.execute() File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 302, in execute settings.INSTALLED_APPS File "/usr/local/lib/python2.7/dist-packages/django/conf/__init__.py", line 55, in __getattr__ self._setup(name) File "/usr/local/lib/python2.7/dist-packages/django/conf/__init__.py", line 43, in _setup self._wrapped = Settings(settings_module) File "/usr/local/lib/python2.7/dist-packages/django/conf/__init__.py", line 99, in __init__ mod = importlib.import_module(self.SETTINGS_MODULE) File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module __import__(name) File "/srv/modoboa/instance/instance/settings.py", line 250, in <module> from modoboa_amavis.settings import * ImportError: No module named modoboa_amavis.settings ``` `$ python manage.py collectstatic` ``` Traceback (most recent call last): File "manage.py", line 10, in <module> execute_from_command_line(sys.argv) File "/usr/local/lib/python2.7/dist-packages/django/core/managemen/__init__.py", line 353, in execute_from_command_line utility.execute() File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 302, in execute settings.INSTALLED_APPS File "/usr/local/lib/python2.7/dist-packages/django/conf/__init__.py", line 55, in __getattr__ self._setup(name) File "/usr/local/lib/python2.7/dist-packages/django/conf/__init__.py", line 43, in _setup self._wrapped = Settings(settings_module) File "/usr/local/lib/python2.7/dist-packages/django/conf/__init__.py", line 99, in __init__ mod = importlib.import_module(self.SETTINGS_MODULE) File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module __import__(name) File "/srv/modoboa/instance/instance/settings.py", line 250, in <module> from modoboa_amavis.settings import * ImportError: No module named modoboa_amavis.settings ``` Any insights? My environment: Debian 8 (Jessie) ![screen shot 2016-10-13 at 14 48 06](https://cloud.githubusercontent.com/assets/2399854/19351530/186281fe-9154-11e6-96d0-b9234703f54b.png)
Author
Owner

@tonioo commented on GitHub (Oct 13, 2016):

Looks like the shell of the modoboa user is not bash. Please retry like this:

> su - modoboa
> bash
> source env/bin/activate
> cd instance
> python manage.py migrate
> python manage.py collectstatic
<!-- gh-comment-id:253520192 --> @tonioo commented on GitHub (Oct 13, 2016): Looks like the shell of the modoboa user is not bash. Please retry like this: ``` bash > su - modoboa > bash > source env/bin/activate > cd instance > python manage.py migrate > python manage.py collectstatic ```
Author
Owner

@tonioo commented on GitHub (Oct 13, 2016):

@abmiller99 Is it better ?

<!-- gh-comment-id:253554461 --> @tonioo commented on GitHub (Oct 13, 2016): @abmiller99 Is it better ?
Author
Owner

@abmiller99 commented on GitHub (Oct 13, 2016):

I semi-bricked my install and had to restore from backup.

Now I'll try again using your commands with my working v1.6.0:

root@mail ~ $ su - modoboa

$ bash

modoboa@mail:~$ source env/bin/activate

(env)modoboa@mail:~$ cd instance

(env)modoboa@mail:~/instance$ python manage.py migrate

Operations to perform:
 Apply all migrations: authtoken, core, limits, lib, sessions, admin, modoboa_postfix_autoreply, auth, sites, reversion, contenttypes, modoboa_amavis, relaydomains
Running migrations:
 No migrations to apply.
 Your models have changes that are not yet reflected in a migration, and so won't be applied.
 Run 'manage.py makemigrations' to make new migrations, and then re-run 'manage.py migrate' to apply them.

I'll pause here for your input..

<!-- gh-comment-id:253557351 --> @abmiller99 commented on GitHub (Oct 13, 2016): I semi-bricked my install and had to restore from backup. Now I'll try again using your commands with my working v1.6.0: `root@mail ~ $ su - modoboa` `$ bash` `modoboa@mail:~$ source env/bin/activate` `(env)modoboa@mail:~$ cd instance` `(env)modoboa@mail:~/instance$ python manage.py migrate` ``` Operations to perform: Apply all migrations: authtoken, core, limits, lib, sessions, admin, modoboa_postfix_autoreply, auth, sites, reversion, contenttypes, modoboa_amavis, relaydomains Running migrations: No migrations to apply. Your models have changes that are not yet reflected in a migration, and so won't be applied. Run 'manage.py makemigrations' to make new migrations, and then re-run 'manage.py migrate' to apply them. ``` I'll pause here for your input..
Author
Owner

@tonioo commented on GitHub (Oct 13, 2016):

This is fine. You can continue.
Le 13 oct. 2016 5:59 PM, Andrew Miller notifications@github.com a écrit :I semi-bricked my install and had to restore from backup.

Now I'll try again using your commands with my working v1.6.0:

root@mail ~ $ su - modoboa

$ bash

modoboa@mail:~$ source env/bin/activate

(env)modoboa@mail:~$ cd instance

(env)modoboa@mail:~/instance$ python manage.py migrate

Operations to perform:
Apply all migrations: authtoken, core, limits, lib, sessions, admin, modoboa_postfix_autoreply, auth, sites, reversion, contenttypes, modoboa_amavis, relaydomains
Running migrations:
No migrations to apply.
Your models have changes that are not yet reflected in a migration, and so won't be applied.
Run 'manage.py makemigrations' to make new migrations, and then re-run 'manage.py migrate' to apply them.

I'll pause here for your input..

—You are receiving this because you commented.Reply to this email directly, view it on GitHub, or mute the thread.

<!-- gh-comment-id:253559630 --> @tonioo commented on GitHub (Oct 13, 2016): This is fine. You can continue. Le 13 oct. 2016 5:59 PM, Andrew Miller notifications@github.com a écrit :I semi-bricked my install and had to restore from backup. Now I'll try again using your commands with my working v1.6.0: root@mail ~ $ su - modoboa $ bash modoboa@mail:~$ source env/bin/activate (env)modoboa@mail:~$ cd instance (env)modoboa@mail:~/instance$ python manage.py migrate Operations to perform: Apply all migrations: authtoken, core, limits, lib, sessions, admin, modoboa_postfix_autoreply, auth, sites, reversion, contenttypes, modoboa_amavis, relaydomains Running migrations: No migrations to apply. Your models have changes that are not yet reflected in a migration, and so won't be applied. Run 'manage.py makemigrations' to make new migrations, and then re-run 'manage.py migrate' to apply them. I'll pause here for your input.. —You are receiving this because you commented.Reply to this email directly, view it on GitHub, or mute the thread.
Author
Owner

@abmiller99 commented on GitHub (Oct 13, 2016):

(env)modoboa@mail:~/instance$ python manage.py makemigrations

Migrations for 'admin':
  0005_auto_20161013_1808.py:
    - Alter field description on alias
    - Alter field expire_at on alias
Migrations for 'core':
  0009_auto_20161013_1808.py:
    - Alter field first_name on user
    - Alter field language on user
    - Alter field last_name on user

(env)modoboa@mail:~/instance$ python manage.py migrate

Operations to perform:
  Apply all migrations: authtoken, core, limits, lib, sessions, admin, modoboa_postfix_autoreply, auth, sites, reversion, contenttypes, modoboa_amavis, relaydomains
Running migrations:
  Rendering model states... DONE
  Applying admin.0005_auto_20161013_1808... OK
  Applying core.0009_auto_20161013_1808... OK

Now what? Restart uWSGI?

<!-- gh-comment-id:253561001 --> @abmiller99 commented on GitHub (Oct 13, 2016): `(env)modoboa@mail:~/instance$ python manage.py makemigrations` ``` Migrations for 'admin': 0005_auto_20161013_1808.py: - Alter field description on alias - Alter field expire_at on alias Migrations for 'core': 0009_auto_20161013_1808.py: - Alter field first_name on user - Alter field language on user - Alter field last_name on user ``` `(env)modoboa@mail:~/instance$ python manage.py migrate` ``` Operations to perform: Apply all migrations: authtoken, core, limits, lib, sessions, admin, modoboa_postfix_autoreply, auth, sites, reversion, contenttypes, modoboa_amavis, relaydomains Running migrations: Rendering model states... DONE Applying admin.0005_auto_20161013_1808... OK Applying core.0009_auto_20161013_1808... OK ``` Now what? Restart uWSGI?
Author
Owner

@tonioo commented on GitHub (Oct 13, 2016):

Sorry, I meant you can continue with the procedure I gave you.

Run the following commands please:

> python manage.py migrate core 0008
> python manage.py migrate admin 0004

You should also remove the two migration files you created by running the "makemigrations" command. (you should find them in /srv/modoboa/env/lib/python2.7/site-packages/modoboa/core/migrations/0009_auto_20161013_1808.py and srv/modoboa/env/lib/python2.7/site-packages/modoboa/admin/migrations/0005_auto_20161013_1808.py)

Then, continue with the collectstatic command of this original procedure and finally, reload uwsgi.

<!-- gh-comment-id:253563504 --> @tonioo commented on GitHub (Oct 13, 2016): Sorry, I meant you can continue with the procedure I gave you. Run the following commands please: ``` bash > python manage.py migrate core 0008 > python manage.py migrate admin 0004 ``` You should also remove the two migration files you created by running the "makemigrations" command. (you should find them in /srv/modoboa/env/lib/python2.7/site-packages/modoboa/core/migrations/0009_auto_20161013_1808.py and srv/modoboa/env/lib/python2.7/site-packages/modoboa/admin/migrations/0005_auto_20161013_1808.py) Then, continue with the collectstatic command of this original procedure and finally, reload uwsgi.
Author
Owner

@abmiller99 commented on GitHub (Oct 13, 2016):

OK -

(env)modoboa@mail:~/instance$ python manage.py migrate core 0008

Operations to perform:
  Target specific migration: 0008_localconfig, from core
Running migrations:
  Rendering model states... DONE
  Unapplying core.0009_auto_20161013_1808... OK

(env)modoboa@mail:~/instance$ python manage.py migrate admin 0004

Operations to perform:
  Target specific migration: 0004_auto_20160914_0907, from admin
Running migrations:
  Rendering model states... DONE
  Unapplying admin.0005_auto_20161013_1808... OK

You should also remove the two migration files you created by running the "makemigrations" command. (you should find them in /srv/modoboa/env/lib/python2.7/site-packages/modoboa/core/migrations/0009_auto_20161013_1808.py and srv/modoboa/env/lib/python2.7/site-packages/modoboa/admin/migrations/0005_auto_20161013_1808.py)

done.

(env)modoboa@mail:~/instance$ python manage.py collectstatic

You have requested to collect static files at the destination location as specified in your settings:

    /srv/modoboa/instance/sitestatic

This will overwrite existing files!
Are you sure you want to do this?

Type 'yes' to continue, or 'no' to cancel: yes

0 static files copied to '/srv/modoboa/instance/sitestatic', 1455 unmodified.

root@mail ~ $ service uwsgi reload

I'm guessing that the report of 0 static files copied means that I didn't do something?

Modoboa still at v1.6.0.

<!-- gh-comment-id:253575774 --> @abmiller99 commented on GitHub (Oct 13, 2016): OK - `(env)modoboa@mail:~/instance$ python manage.py migrate core 0008` ``` Operations to perform: Target specific migration: 0008_localconfig, from core Running migrations: Rendering model states... DONE Unapplying core.0009_auto_20161013_1808... OK ``` `(env)modoboa@mail:~/instance$ python manage.py migrate admin 0004` ``` Operations to perform: Target specific migration: 0004_auto_20160914_0907, from admin Running migrations: Rendering model states... DONE Unapplying admin.0005_auto_20161013_1808... OK ``` > You should also remove the two migration files you created by running the "makemigrations" command. (you should find them in /srv/modoboa/env/lib/python2.7/site-packages/modoboa/core/migrations/0009_auto_20161013_1808.py and srv/modoboa/env/lib/python2.7/site-packages/modoboa/admin/migrations/0005_auto_20161013_1808.py) done. `(env)modoboa@mail:~/instance$ python manage.py collectstatic` ``` You have requested to collect static files at the destination location as specified in your settings: /srv/modoboa/instance/sitestatic This will overwrite existing files! Are you sure you want to do this? Type 'yes' to continue, or 'no' to cancel: yes 0 static files copied to '/srv/modoboa/instance/sitestatic', 1455 unmodified. ``` `root@mail ~ $ service uwsgi reload` I'm guessing that the report of `0 static files copied` means that I didn't do something? Modoboa still at v1.6.0.
Author
Owner

@tonioo commented on GitHub (Oct 13, 2016):

0 static files copied only means there was nothing to update and it is normal with this version.

Have you tried to restart uwsgi ?

<!-- gh-comment-id:253587509 --> @tonioo commented on GitHub (Oct 13, 2016): `0 static files copied` only means there was nothing to update and it is normal with this version. Have you tried to restart uwsgi ?
Author
Owner

@abmiller99 commented on GitHub (Oct 13, 2016):

Have you tried to restart uwsgi ?

Yes

Going back to the beginning of the update procedure - would it be correct to run the python install script first before proceeding with the commands you provided? For example:

Step 1)

$ git clone https://github.com/modoboa/modoboa-installer
$ cd modoboa-installer
$ sudo ./run.py <mail server hostname>

Step 2)

> su - modoboa
> bash
> source env/bin/activate
> cd instance
> python manage.py migrate
> python manage.py collectstatic

Step 3)

$ service uwsgi reload

<!-- gh-comment-id:253598492 --> @abmiller99 commented on GitHub (Oct 13, 2016): > Have you tried to restart uwsgi ? Yes Going back to the beginning of the update procedure - would it be correct to run the python install script first before proceeding with the commands you provided? For example: Step 1) ``` $ git clone https://github.com/modoboa/modoboa-installer $ cd modoboa-installer $ sudo ./run.py <mail server hostname> ``` Step 2) ``` > su - modoboa > bash > source env/bin/activate > cd instance > python manage.py migrate > python manage.py collectstatic ``` Step 3) `$ service uwsgi reload`
Author
Owner

@tonioo commented on GitHub (Oct 13, 2016):

Yes, it would be correct.

<!-- gh-comment-id:253622664 --> @tonioo commented on GitHub (Oct 13, 2016): Yes, it would be correct.
Author
Owner

@abmiller99 commented on GitHub (Oct 14, 2016):

Still at 1.6.0

I also tried using pip install method:

pip install modoboa==1.6.1

Got lots of these:
Could not find .egg-info directory in install record for gevent==1.1.1 (from modoboa==1.6.1)
Could not find .egg-info directory in install record for dnspython==1.12.0 (from modoboa==1.6.1)
Could not find .egg-info directory in install record for jsonfield==1.0.3 (from modoboa==1.6.1)
Could not find .egg-info directory in install record for py-dateutil==2.2 (from modoboa==1.6.1)
Could not find .egg-info directory in install record for feedparser==5.2.1 (from modoboa==1.6.1)
Could not find .egg-info directory in install record for cffi>=1.1 (from bcrypt==2.0.0->modoboa==1.6.1)
Could not find .egg-info directory in install record for LEPL (from rfc6266->modoboa==1.6.1)
Could not find .egg-info directory in install record for greenlet>=0.4.9 (from gevent==1.1.1->modoboa==1.6.1)
Could not find .egg-info directory in install record for pycparser (from cffi>=1.1->bcrypt==2.0.0->modoboa==1.6.1)

and quite a few warnings like:

 no previously-included directories found matching '*/__pycache__'
    warning: no previously-included files matching '*.o' found anywhere in distribution
    no previously-included directories found matching 'doc/_build'
    warning: no previously-included files matching '*.pyc' found anywhere in distribution
    warning: no previously-included files matching '.coverage' found under directory 'greentest'
    no previously-included directories found matching 'greentest/htmlcov'
    warning: no previously-included files matching 'ares_build.h.orig' found under directory 'c-ares'
    warning: no previously-included files matching '_corecffi.c' found under directory 'gevent'
    warning: no previously-included files found matching 'Makefile'
<!-- gh-comment-id:253768684 --> @abmiller99 commented on GitHub (Oct 14, 2016): Still at 1.6.0 I also tried using pip install method: pip install modoboa==1.6.1 Got lots of these: `Could not find .egg-info directory in install record for gevent==1.1.1 (from modoboa==1.6.1)` `Could not find .egg-info directory in install record for dnspython==1.12.0 (from modoboa==1.6.1)` `Could not find .egg-info directory in install record for jsonfield==1.0.3 (from modoboa==1.6.1)` `Could not find .egg-info directory in install record for py-dateutil==2.2 (from modoboa==1.6.1)` `Could not find .egg-info directory in install record for feedparser==5.2.1 (from modoboa==1.6.1)` `Could not find .egg-info directory in install record for cffi>=1.1 (from bcrypt==2.0.0->modoboa==1.6.1)` `Could not find .egg-info directory in install record for LEPL (from rfc6266->modoboa==1.6.1)` `Could not find .egg-info directory in install record for greenlet>=0.4.9 (from gevent==1.1.1->modoboa==1.6.1)` `Could not find .egg-info directory in install record for pycparser (from cffi>=1.1->bcrypt==2.0.0->modoboa==1.6.1)` and quite a few warnings like: ``` no previously-included directories found matching '*/__pycache__' warning: no previously-included files matching '*.o' found anywhere in distribution no previously-included directories found matching 'doc/_build' warning: no previously-included files matching '*.pyc' found anywhere in distribution warning: no previously-included files matching '.coverage' found under directory 'greentest' no previously-included directories found matching 'greentest/htmlcov' warning: no previously-included files matching 'ares_build.h.orig' found under directory 'c-ares' warning: no previously-included files matching '_corecffi.c' found under directory 'gevent' warning: no previously-included files found matching 'Makefile' ```
Author
Owner

@tonioo commented on GitHub (Oct 14, 2016):

Please make sure to run commands as modoboa user and that the virtualenv is properly loaded (source ~/env/bin/activate).
Then, can you run the following command please:
pip list | grep modoboa

<!-- gh-comment-id:253783832 --> @tonioo commented on GitHub (Oct 14, 2016): Please make sure to run commands as `modoboa` user and that the virtualenv is properly loaded (`source ~/env/bin/activate`). Then, can you run the following command please: `pip list | grep modoboa`
Author
Owner

@abmiller99 commented on GitHub (Oct 14, 2016):

(env)modoboa@mail:~$ pip list | grep modoboa

modoboa (1.6.0)
modoboa-admin (1.1.2)
modoboa-amavis (1.0.9)
modoboa-pdfcredentials (1.0.3)
modoboa-postfix-autoreply (1.1.6)
modoboa-sievefilters (1.0.6)
modoboa-stats (1.0.8)
modoboa-webmail (1.0.4)
<!-- gh-comment-id:253784293 --> @abmiller99 commented on GitHub (Oct 14, 2016): `(env)modoboa@mail:~$ pip list | grep modoboa` ``` modoboa (1.6.0) modoboa-admin (1.1.2) modoboa-amavis (1.0.9) modoboa-pdfcredentials (1.0.3) modoboa-postfix-autoreply (1.1.6) modoboa-sievefilters (1.0.6) modoboa-stats (1.0.8) modoboa-webmail (1.0.4) ```
Author
Owner

@tonioo commented on GitHub (Oct 14, 2016):

Ok. Please try the following now:

> pip install -U pip
> pip uninstall modoboa-admin
> pip install modoboa==1.6.1
<!-- gh-comment-id:253784699 --> @tonioo commented on GitHub (Oct 14, 2016): Ok. Please try the following now: ``` bash > pip install -U pip > pip uninstall modoboa-admin > pip install modoboa==1.6.1 ```
Author
Owner

@abmiller99 commented on GitHub (Oct 14, 2016):

(env)modoboa@mail:~$ pip uninstall modoboa-admin
...
Successfully uninstalled modoboa-admin-1.1.2

(env)modoboa@mail:~$ pip install modoboa==1.6.1
..
Successfully installed modoboa-1.6.1

<!-- gh-comment-id:253785433 --> @abmiller99 commented on GitHub (Oct 14, 2016): `(env)modoboa@mail:~$ pip uninstall modoboa-admin` ... `Successfully uninstalled modoboa-admin-1.1.2` `(env)modoboa@mail:~$ pip install modoboa==1.6.1` .. `Successfully installed modoboa-1.6.1`
Author
Owner

@tonioo commented on GitHub (Oct 14, 2016):

Looks better !
Now, upgrade map files and postfix configuration (as described in the blog post) and reload uwsgi and you'll be done.

<!-- gh-comment-id:253786413 --> @tonioo commented on GitHub (Oct 14, 2016): Looks better ! Now, upgrade map files and postfix configuration (as described in the blog post) and reload uwsgi and you'll be done.
Author
Owner

@abmiller99 commented on GitHub (Oct 14, 2016):

python manage.py generate_postfix_maps --destdir <path> --force-overwrite

How I do know my <path>? Is it /etc/postfix?

<!-- gh-comment-id:253787099 --> @abmiller99 commented on GitHub (Oct 14, 2016): `python manage.py generate_postfix_maps --destdir <path> --force-overwrite` How I do know my `<path>`? Is it /etc/postfix?
Author
Owner

@abmiller99 commented on GitHub (Oct 14, 2016):

OK:
<path> = /etc/postfix/
<driver> = pgsql

Ran this:
(env)modoboa@mail:~$ cd instance
(env)modoboa@mail:~/instance$ python manage.py generate_postfix_maps --destdir /etc/postfix

Traceback (most recent call last):
  File "manage.py", line 10, in <module>
    execute_from_command_line(sys.argv)
  File "/srv/modoboa/env/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 353, in execute_from_command_line
    utility.execute()
  File "/srv/modoboa/env/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 345, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/srv/modoboa/env/local/lib/python2.7/site-packages/django/core/management/base.py", line 348, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/srv/modoboa/env/local/lib/python2.7/site-packages/django/core/management/base.py", line 399, in execute
    output = self.handle(*args, **options)
  File "/srv/modoboa/env/local/lib/python2.7/site-packages/modoboa/core/management/commands/generate_postfix_maps.py", line 157, in handle
    force_overwrite=options["force_overwrite"])
  File "/srv/modoboa/env/local/lib/python2.7/site-packages/modoboa/core/management/commands/generate_postfix_maps.py", line 125, in __render_map_file
    mapcontent = utils.parse_map_file(fullpath)
  File "/srv/modoboa/env/local/lib/python2.7/site-packages/modoboa/core/utils.py", line 21, in parse_map_file
    name, value = line.split("=", 1)
ValueError: need more than 1 value to unpack

Then checked postfix main.cf for:

smtpd_sender_login_maps =
    <driver>:<path>/sql-sender-login-mailboxes.cf
    <driver>:<path>/sql-sender-login-aliases.cf
    <driver>:<path>/sql-sender-login-mailboxes-extra.cf

(it was already there)

Then
$ service postfix reload

Then
$ service uwsgi reload

screen shot 2016-10-14 at 13 28 13

<!-- gh-comment-id:253793413 --> @abmiller99 commented on GitHub (Oct 14, 2016): OK: `<path>` = `/etc/postfix/` `<driver>` = `pgsql` Ran this: `(env)modoboa@mail:~$ cd instance` `(env)modoboa@mail:~/instance$ python manage.py generate_postfix_maps --destdir /etc/postfix` ``` Traceback (most recent call last): File "manage.py", line 10, in <module> execute_from_command_line(sys.argv) File "/srv/modoboa/env/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 353, in execute_from_command_line utility.execute() File "/srv/modoboa/env/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 345, in execute self.fetch_command(subcommand).run_from_argv(self.argv) File "/srv/modoboa/env/local/lib/python2.7/site-packages/django/core/management/base.py", line 348, in run_from_argv self.execute(*args, **cmd_options) File "/srv/modoboa/env/local/lib/python2.7/site-packages/django/core/management/base.py", line 399, in execute output = self.handle(*args, **options) File "/srv/modoboa/env/local/lib/python2.7/site-packages/modoboa/core/management/commands/generate_postfix_maps.py", line 157, in handle force_overwrite=options["force_overwrite"]) File "/srv/modoboa/env/local/lib/python2.7/site-packages/modoboa/core/management/commands/generate_postfix_maps.py", line 125, in __render_map_file mapcontent = utils.parse_map_file(fullpath) File "/srv/modoboa/env/local/lib/python2.7/site-packages/modoboa/core/utils.py", line 21, in parse_map_file name, value = line.split("=", 1) ValueError: need more than 1 value to unpack ``` Then checked postfix main.cf for: ``` smtpd_sender_login_maps = <driver>:<path>/sql-sender-login-mailboxes.cf <driver>:<path>/sql-sender-login-aliases.cf <driver>:<path>/sql-sender-login-mailboxes-extra.cf ``` (it was already there) Then `$ service postfix reload` Then `$ service uwsgi reload` ![screen shot 2016-10-14 at 13 28 13](https://cloud.githubusercontent.com/assets/2399854/19388321/e4fd9330-9216-11e6-84c7-20e32037de30.png)
Author
Owner

@tonioo commented on GitHub (Oct 14, 2016):

The generate_postfix_maps command must be ran as root (because it is writing to /etc/postfix) and you forgot the --force-overwrite option.

About the internal error, you need to upgrade extensions too.

<!-- gh-comment-id:253796752 --> @tonioo commented on GitHub (Oct 14, 2016): The `generate_postfix_maps` command must be ran as root (because it is writing to /etc/postfix) and you forgot the `--force-overwrite` option. About the internal error, you need to upgrade extensions too.
Author
Owner

@abmiller99 commented on GitHub (Oct 14, 2016):

OK,

root@mail /srv/modoboa/instance $ python manage.py generate_postfix_maps --destdir /etc/postfix --force-overwrite

Traceback (most recent call last):
  File "manage.py", line 10, in <module>
    execute_from_command_line(sys.argv)
  File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 353, in execute_from_command_line
    utility.execute()
  File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 302, in execute
    settings.INSTALLED_APPS
  File "/usr/local/lib/python2.7/dist-packages/django/conf/__init__.py", line 55, in __getattr__
    self._setup(name)
  File "/usr/local/lib/python2.7/dist-packages/django/conf/__init__.py", line 43, in _setup
    self._wrapped = Settings(settings_module)
  File "/usr/local/lib/python2.7/dist-packages/django/conf/__init__.py", line 99, in __init__
    mod = importlib.import_module(self.SETTINGS_MODULE)
  File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
    __import__(name)
  File "/srv/modoboa/instance/instance/settings.py", line 250, in <module>
    from modoboa_amavis.settings import *
ImportError: No module named modoboa_amavis.settings

root@mail /srv/modoboa/instance :( $ service uwsgi reload
root@mail /srv/modoboa/instance $ service postfix reload

About the internal error, you need to upgrade extensions too.

Sure - are there instructions for upgrading the plugins?

<!-- gh-comment-id:253798548 --> @abmiller99 commented on GitHub (Oct 14, 2016): OK, `root@mail /srv/modoboa/instance $ python manage.py generate_postfix_maps --destdir /etc/postfix --force-overwrite` ``` Traceback (most recent call last): File "manage.py", line 10, in <module> execute_from_command_line(sys.argv) File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 353, in execute_from_command_line utility.execute() File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 302, in execute settings.INSTALLED_APPS File "/usr/local/lib/python2.7/dist-packages/django/conf/__init__.py", line 55, in __getattr__ self._setup(name) File "/usr/local/lib/python2.7/dist-packages/django/conf/__init__.py", line 43, in _setup self._wrapped = Settings(settings_module) File "/usr/local/lib/python2.7/dist-packages/django/conf/__init__.py", line 99, in __init__ mod = importlib.import_module(self.SETTINGS_MODULE) File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module __import__(name) File "/srv/modoboa/instance/instance/settings.py", line 250, in <module> from modoboa_amavis.settings import * ImportError: No module named modoboa_amavis.settings ``` `root@mail /srv/modoboa/instance :( $ service uwsgi reload` `root@mail /srv/modoboa/instance $ service postfix reload` > About the internal error, you need to upgrade extensions too. Sure - are there instructions for upgrading the plugins?
Author
Owner

@tonioo commented on GitHub (Oct 14, 2016):

Run the generate_postfix_maps command as follows:

> /srv/modoboa/env/bin/python /srv/modoboa/instance/manage.py generate_postfix_maps --destdir /etc/postfix --force-overwrite

To upgrade extensions, run (as modoboa and with virtualenv loaded):

> pip install modoboa-amavis==1.0.10
> pip install modoboa-stats==1.0.9
> pip install modoboa-postfix-autoreply==1.1.7

And reload uwsgi.

<!-- gh-comment-id:253799792 --> @tonioo commented on GitHub (Oct 14, 2016): Run the `generate_postfix_maps` command as follows: ``` bash > /srv/modoboa/env/bin/python /srv/modoboa/instance/manage.py generate_postfix_maps --destdir /etc/postfix --force-overwrite ``` To upgrade extensions, run (**as modoboa and with virtualenv loaded**): ``` bash > pip install modoboa-amavis==1.0.10 > pip install modoboa-stats==1.0.9 > pip install modoboa-postfix-autoreply==1.1.7 ``` And reload uwsgi.
Author
Owner

@abmiller99 commented on GitHub (Oct 14, 2016):

OK that all worked 100% - tremendous job guiding me.

screen shot 2016-10-14 at 14 44 45

<!-- gh-comment-id:253803115 --> @abmiller99 commented on GitHub (Oct 14, 2016): OK that all worked 100% - tremendous job guiding me. ![screen shot 2016-10-14 at 14 44 45](https://cloud.githubusercontent.com/assets/2399854/19389717/e5b4bbb8-921c-11e6-9a69-fd8c161932a6.png)
Author
Owner

@mdcfe commented on GitHub (Oct 14, 2016):

I've been following this as it happened - I encountered very similar problems to this and this just helped me fix them. Thanks @tonioo

<!-- gh-comment-id:253803717 --> @mdcfe commented on GitHub (Oct 14, 2016): I've been following this as it happened - I encountered very similar problems to this and this just helped me fix them. Thanks @tonioo
Author
Owner

@tonioo commented on GitHub (Oct 19, 2016):

The documentation has been refactored and now includes clear upgrade instructions (I hope so).
http://modoboa.readthedocs.io/en/latest/upgrade.html

<!-- gh-comment-id:254742807 --> @tonioo commented on GitHub (Oct 19, 2016): The documentation has been refactored and now includes clear upgrade instructions (I hope so). http://modoboa.readthedocs.io/en/latest/upgrade.html
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/modoboa-modoboa#806
No description provided.