mailserver-admin
This application manages domains, users and aliases of a mail server.
This has been tested with dovecot, using either mysql or postgresql database.
The main goal was to enhance/replace Jeffrey Boehm’s PHP mailserver-admin application because I didn’t want to have a mail server administration application in PHP and I wanted to have administration account per domain.
Environment variables
Required:
DJANGO_SECRET_KEY: at least 40 characters. Should be specified for production.DJANGO_DB_TYPE:postgresormysql, default tomysql.DJANGO_DB_HOST: database hostname, default todb(for use in docker-compose).DJANGO_DB_PORT: database port, default to empty (default port).DJANGO_DB_NAME: database name, default tomailserver.DJANGO_DB_USER: database user, default tomailserver.DJANGO_DB_PASSWORD: database password, default tochangeme.
Optional:
DJANGO_DEBUG: defaultFalse. Set toTrueto enable debug toolbar, more logs and static files served.DJANGO_LOG_LEVEL: default toWARNING(INFOifDJANGO_DEBUG).DJANGO_RUNSERVER_LOG_LEVEL: default toINFO(DEBUGifDJANGO_DEBUG). Used only when run withrunserverorrunserver_plus.DJANGO_TZ: timezone, defaut toUTC.DJANGO_WEBMAIL_URL: webmail url to show in the footer, default to no link.DJANGO_VENDOR_NAME: any vendor name you want to appear on the footer, default to Sources.DJANGO_VENDOR_URL: any url you want to be linked to your vendor name, default to this repository url. Set to empty to disable the link.DJANGO_HIDE_VERSION: defaultFalseifDJANGO_DEBUGelseTrue. Set toTrueto hide themailserver-adminversion.
Install from PyPi
VirtualEnv and Dependencies
Minium python version is 3.9.
Use:
pipenv install mailserver-admin
to install it without any database backend.
If you want to install the mysql or postgresql database backend alongside, use for instance:
pipenv install mailserver-admin[mysql]
Configuration
Define the required environment variables then:
export DJANGO_SETTINGS_MODULE=mailserveradmin.config.settings
pipenv run django migrate
pipenv run django createsuperuser
TODO
You can now server the application using any WSGI server pointing to $(VISUAL='readlink -f' pipenv open mailserveradmin|tail -n1)/config/wsgi.py.
Don’t forget to also serve static ressources located at $(VISUAL='readlink -f' pipenv open mailserveradmin|tail -n1)/to_serve folder.
You can of course make symlinks to those locations to simplify configuration.
Install from sources
VirtualEnv and Dependencies
Use:
pipenv sync -d
to install dependencies. Default python version is 3.9.
Installation
You should also install a database driver, either mysqlclient or psycopg2-binary:
pipenv run pip install mysqlclient
Configuration
Define the required environment variables then:
pipenv run ./manage.py migrate
pipenv run ./manage.py createsuperuser
pipenv run ./manage.py collectstatic
You can now server the application using any WSGI server pointing to the config/wsgi.py file.
Don’t forget to also serve the static/ folder.
Alternatively, you can test the application with pipenv run ./manage.py runserver_plus but this should only be used for testing/development.
Metadata
Release files for mailserver-admin 0.9.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| mailserver-admin-0.9.0.tar.gz | 1.5 MB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| mailserver_admin-0.9.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 2.9 MB
Release files / mailserver-admin-0.9.0.tar.gz
| Download URL | mailserver-admin-0.9.0.tar.gz |
|---|---|
| Size | 1.5 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
dd8c287c0be723878fcd2adeddf7bfcf4f520e8a458eead713ffc56a4535a17f
|
|
BLAKE2b-256 checksum How to use checksums |
a253b08e0a3e5aa541da98786449fe4841e73d5efa17ed6e90d0d4db13459d57
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.2
|
Release files / mailserver_admin-0.9.0-py3-none-any.whl
| Download URL | mailserver_admin-0.9.0-py3-none-any.whl |
|---|---|
| Size | 1.5 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
440b1c02dff10ab06837d459bffbf5a0c8a60907812f5a8dbb3e0c5f528620de
|
|
BLAKE2b-256 checksum How to use checksums |
3594d00904b91d8b442da683fa6f2b23ce8e884297615a332f5ae099a1d87442
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.2
|
Security for mailserver-admin 0.9.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.