A modern web application API (Python/Flask) for email, calendars and address books
A UI is also available SOGo 6 UI, but you can use this API with scripts or even make your own UI!
It's still an alpha in active development and cannot be used in production environment.
All features are not implemented and bugs are still present. Changes (deprecation, rupture) may also appear on the API and the best will be done to inform you.
SOGo is an Open Source Webmail for businesses and communities. It has been around for more than twenty years!
SOGo 6 is the new iteration with a total overhaul. SOGo 5 version can be found here.
SOGo 6 server uses the Python framework Flask.
You can find our documentation online here
- Python ≥ 3.10 (Also we're only developing on Python 3.14, this requirement only comes from our external modules' own requirements)
- Poetry: ≥ 2.0 (was tested with 2.4) : Python packaging and dependency management
Some of our Python modules also need C Libraries to be installed before them:
- python-ldap: They need the C client ldap (which was used by SOGo 5!). See their documentation
- Psycopg: Beware, this is psycogpg 3, not the 2, but the package name is just
psycogpg. For the current devellopment, the pure python is used for debugging which needs the libpq PostgreSQL Client Library, see their documentation. Even if you don't use PostgreSQL, SOGo will still install this
In the current version, you will need to clone this repository to test SOGo 6 server.
SOGo 6 API server itself doesn't do a lot as it needs other services to work:
Mandatory to start the server
- A database server to store its data. You need a database and a user which has the rights to create table, read/write and modify them.
- A Redis server for the caching system.
Mandatory to authenticate
- A user source, only ldap server for now (sql user sources are not implemented yet)
Mandatory for email
- A mail server like dovecot or cyrus (all our tests have been performed with dovecot)
- an outgoing mail server, postfix. (binary sendmail client not implemented yet)
SOGo 6 server needs process settings to make it start properly. Those process settings also include flask settings, if needed.
- You can look at the doc to see them with explanation ProcessSetting doc. The list is not completed but is enough to start.
- You can look at the ProcessSetting.py to see the list
- To use a file, put it at
/etc/sogo/process.conf. There is an example here
At the first run, SOGo 6 will build the database structures but leave them empty. Meaning no users source or mail server will be configured.
In this state, SOGo 6 only allows the ADMIN API to set the first config.
You can avoid that by directly giving the config json files, that will only be used once. To do that, set those ENV (or in process.conf file)
- SOGO_INIT_SYSTEM_SETTINGS_PATH: string, path where to json file with system_settings
- SOGO_INIT_DOMAIN_SETTINGS_PATH: string, path where to json file with default_domain_settings
You can find example of those files there system_settings, domain_settings scripts/init/system_settings.json
- Doc for system settings
- Doc for domain settings: Not finished yet
Once all of this is done, use poetry to install the dependencies:
poetry install
Then you can run the Flask server:
poetry run start
No proper gunicorn conf is provided yet, you can only run Flask in develloper mode.
At the index of the server, you will find the link to the swaggers by default, go there: http://localhost:5000/
You can also build an image of SOGo with this Dockerfile.
You can also use our devcontainer with Visual Studio Code. It will run all the external services needed.
Once built, simply run poetry run start to launch the Flask application.
If you have errors about poetry, delete the file poetry.lock before running the devcontainer
The swaggers will be at:
http://localhost:5000/swagger-basicfor the user APIhttp://localhost:5000/swagger-adminfor the Admin API
See CONTRIBUTING.md