modoboa / modoboa-installer

An installer for Modoboa
MIT License
254 stars 135 forks source link

Automx does not install correctly, Modoboa 2.2.0. #521

Closed Aegis8 closed 4 months ago

Aegis8 commented 11 months ago

Hello,

First off, thank you for modoboa and the installer! Getting a mail host up, has never been easier.

Now to the problem, after a migration and several test set ups, I found that automx was not installed correctly. I had assumed that it was working, for example Mozilla Thunderbird and Nextcloud automatically retrieved the server details. Only when inspecting the automx and syslogs, did I see that Thunderbird checked automx, received an error and continued with its own discovery methods.

The fix below works for Thunderbird and Outlook, this I tested using Postman. No other changes were made. I can not test IOS.

** Edit: corrected the commit link.

Impacted versions

modoboa 2.2.0 and I assume previous versions that incorporated https://github.com/modoboa/modoboa-installer/commit/d547d37ece20f30257cc74e5c43f0ae28e3f957f

Steps to reproduce

Run the modoboa installer. In the automx virtualenv, run pip list Or run the installer with --debug and check the output for automx

image

results in:

image

I traced the problem to the changes made in https://github.com/modoboa/modoboa-installer/commit/d547d37ece20f30257cc74e5c43f0ae28e3f957f

I updated the following section in the /scripts/automx.py with '"sqlalchemy < 2.0"'. Note I'm not a dev nor a python expert :)

def _setup_venv(self): """Prepare a python virtualenv.""" python.setup_virtualenv( self.venv_path, sudo_user=self.user, python_version=3) packages = [ "future", "lxml", "ipaddress", '"sqlalchemy < 2.0"', "python-memcached", "python-dateutil", "configparser" ] if self.dbengine == "postgres": packages.append("psycopg2-binary")

Ran the installer again and all the modules were installed for automx.

image

hornikmichal commented 9 months ago

Hello,

The same issue occurs in Debian 11/12 with PostgreSQL/MySQL. By applying the fix mentioned by Aegis8, I was able to complete the full installation and get automx working properly. Without this fix, I needed to install packages in a virtual environment manually.

stale[bot] commented 5 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.