rseichter / automx2

Mail User Agent (email client) configuration made easy
GNU General Public License v3.0
65 stars 20 forks source link

Missing files on fresh install ? #6

Closed camaer closed 2 years ago

camaer commented 2 years ago

I'm trying to install automx2 but I'm having issues. I'm not really familiar with python virtual env but just after installing, I can't find the files to launch the local default instance of automx2.

My python version is 3.8.10 under Ubuntu 20.04.

I've setup the .venv folder using setupvenv.sh and it seems I can "enter" it and install automx2 via pip correctly

root@prd-mail:/opt/automx2# ll
total 16
drwxr-xr-x  3 root root 4096 Jan 14 15:29 ./
drwxr-xr-x 15 root root 4096 Jan 14 15:29 ../
-rwxr--r--  1 root root  417 Jan 14 15:29 setupvenv.sh*
drwxr-xr-x  7 root root 4096 Jan 14 15:29 .venv/
root@prd-mail:/opt/automx2# source .venv/bin/activate
(.venv) root@prd-mail:/opt/automx2# pip install automx2
Requirement already satisfied: automx2 in ./.venv/lib/python3.8/site-packages (2021.6)
Requirement already satisfied: ldap3>=2.6 in ./.venv/lib/python3.8/site-packages (from automx2) (2.9.1)
Requirement already satisfied: Flask>=1.1.1 in ./.venv/lib/python3.8/site-packages (from automx2) (2.0.2)
Requirement already satisfied: Flask-SQLAlchemy>=2.4.1 in ./.venv/lib/python3.8/site-packages (from automx2) (2.5.1)
Requirement already satisfied: Flask-Migrate>=2.5.2 in ./.venv/lib/python3.8/site-packages (from automx2) (3.1.0)
Requirement already satisfied: click>=7.1.2 in ./.venv/lib/python3.8/site-packages (from Flask>=1.1.1->automx2) (8.0.3)
Requirement already satisfied: itsdangerous>=2.0 in ./.venv/lib/python3.8/site-packages (from Flask>=1.1.1->automx2) (2.0.1)
Requirement already satisfied: Werkzeug>=2.0 in ./.venv/lib/python3.8/site-packages (from Flask>=1.1.1->automx2) (2.0.2)
Requirement already satisfied: Jinja2>=3.0 in ./.venv/lib/python3.8/site-packages (from Flask>=1.1.1->automx2) (3.0.3)
Requirement already satisfied: alembic>=0.7 in ./.venv/lib/python3.8/site-packages (from Flask-Migrate>=2.5.2->automx2) (1.7.5)
Requirement already satisfied: SQLAlchemy>=0.8.0 in ./.venv/lib/python3.8/site-packages (from Flask-SQLAlchemy>=2.4.1->automx2) (1.4.29)
Requirement already satisfied: pyasn1>=0.4.6 in ./.venv/lib/python3.8/site-packages (from ldap3>=2.6->automx2) (0.4.8)
Requirement already satisfied: Mako in ./.venv/lib/python3.8/site-packages (from alembic>=0.7->Flask-Migrate>=2.5.2->automx2) (1.1.6)
Requirement already satisfied: importlib-metadata in ./.venv/lib/python3.8/site-packages (from alembic>=0.7->Flask-Migrate>=2.5.2->automx2) (4.10.0)
Requirement already satisfied: importlib-resources in ./.venv/lib/python3.8/site-packages (from alembic>=0.7->Flask-Migrate>=2.5.2->automx2) (5.4.0)
Requirement already satisfied: MarkupSafe>=2.0 in ./.venv/lib/python3.8/site-packages (from Jinja2>=3.0->Flask>=1.1.1->automx2) (2.0.1)
Requirement already satisfied: greenlet!=0.4.17 in ./.venv/lib/python3.8/site-packages (from SQLAlchemy>=0.8.0->Flask-SQLAlchemy>=2.4.1->automx2) (1.1.2)
Requirement already satisfied: zipp>=0.5 in ./.venv/lib/python3.8/site-packages (from importlib-metadata->alembic>=0.7->Flask-Migrate>=2.5.2->automx2) (3.7.0)
(.venv) root@prd-mail:/opt/automx2#

Now the next part is the one I'm having trouble with. I'm trying to launch automx2 from the shell just to confirm that it runs correctly. The thing is according to the doc it seems I don't need to enter the venv again to launch it ?

The doc says to launch it like so: contrib/flask.sh run --host=127.0.0.1 --port=4243

but my install folder does not have a contrib folder:

drwxr-xr-x  3 root root 4096 Jan 14 15:29 ./
drwxr-xr-x 15 root root 4096 Jan 14 15:29 ../
-rwxr--r--  1 root root  417 Jan 14 15:29 setupvenv.sh*
drwxr-xr-x  7 root root 4096 Jan 14 15:29 .venv/

No matter what I do I'm not able to start automx2

root@prd-mail:/opt/automx2# contrib/flask.sh run --host=127.0.0.1 --port=4243
-bash: contrib/flask.sh: No such file or directory
root@prd-mail:/opt/automx2# source .venv/bin/activate
(.venv) root@prd-mail:/opt/automx2# contrib/flask.sh run --host=127.0.0.1 --port=4243
-bash: contrib/flask.sh: No such file or directory

I'm I missing something or is there some steps missing from the doc ? Thanks !

rseichter commented 2 years ago

First of all: As stated in the documentation, please do not run automx2 as root. Doing so is both a security risk and also completely unnecessary.

As far as launching the application is concerned, you should find the necessary script in .venv/scripts/flask.sh. You can also download flask.sh from this Git repository.

rseichter commented 2 years ago

After a quick review, I find the documentation less than ideal, and I'll clarify section 8.3.