Install¤
The Virtual Secretary has 4 parts:
- the Python 3.11 interpreter (aka the runtime),
- the Python packages upon which it depends (aka the libraries),
- the Virtual Secretary application source code (aka the application), located in the
src/
folder of the source code, - the user filters (aka the implementation), typically installed in a
config/
folder.
The Python interpreter is pretty standard in Linux distributions and easy to install on Windows and Mac. However, Linux distributions may have older versions than 3.11. If you plan on using the Virtual Secretary on a shared hosting server, you will not have access to a shell giving you rights to install or update Python. For those cases where you can’t install or update the Python interpreter to version 3.11, download the Python 3.11 AppImage. See below how to deploy Python 3.11 to a server where you don’t have sudo
rights.
Getting the source code¤
The easiest way is to get and update the source code through Git (installation instructions).
Once Git is installed, in a terminal, run:
To update in the future, run:
Python interpreter¤
If you have access to a package manager and you are able to simply install Python 3.11, do it. Otherwise, here is how to deploy the AppImage on a server:
- We assume here you are already in
VirtualSecretary
folder, after thecd VirtualSecretary
command at the previous step. -
Download the AppImage package:
-
Rename it
python3.11.AppImage
for convenience: -
Give it execution permissions:
-
Run the test command:
If it returns: then you need to extract the AppImage because the system can’t do it. Luckily, the AppImage package is self-extractable, so just run:
From there, to execute a Python script (.py
), you have to use one of the following methods:
python3.11 script.py
if you have multiple versions of Python installed,python script.py
if you have only Python 3.11 installed,./python3.11.AppImage script.py
from within theVirtualSecretary
folder if you can use the non-extracted AppImagepython3.11/AppRun script.py
from within theVirtualSecretary
folder if you had to extract the AppImage
In the rest of this document, we will write PYTHON
as a generic way of calling the interpreter that will need to be replaced by one of the above commands depending on your case.
Installing the dependencies¤
From the VirtualSecretary/
folder, run:
Notes on servers¤
Note
This installation procedure was tested on Ubuntu Server 20.04 using an Amazon Elastic Cloud 2 instance, on Fedora Desktop 37 and 38, and on a CPanel-based shared hosting (Debian).
If you use a private or shared hosting, you have access to a server where you may run applications, host websites and mailboxes. It is very desirable to install the Virtual Secretary on the same server hosting your mailbox, as it will be able to filter those email in-place. In that case, for security purposes, it is better to put the application code outside of the HTTP server directories (var_html
, or /var-www
, or any directory accessible through a web browser).
CPanel-based shared hostings have limited resources, but my tests show they can still be used for a single user with a couple email addresses. Nowadays, they provide a web terminal allowing to launch command lines, even though they still don’t come with sudo
rights to install software.
If your hosting does not have a web terminal interface, nor SSH access, and is basically just a piece of harddrive connected to the internet with some way to define Cron jobs, you will have to prepare the VirtualSecretary
folder with the source code and the extracted Python AppImage locally, on your computer, and then to dump it all on the server through FTP.