Skip to main content

CLI to manage your vmail server (Dovecot, Postfix, MySQL)

Project description

vmail-cli

DISCLAIMER: THIS APPLICATION IS STILL IN ALPHA/BETA STATE. DO NOT USE IT IN PRODUCTIVE ENVIRONMENTS IF YOU DON'T WHAT YOU'RE DOING!

vmail-cli is a command line tool and library for managing a mail-server database based on the great HowTo from Thomas Leister written in Python 3. Although the tutorial is using a MySQL/MariaDB database, this command line tool also supports other backends.

Requirements

  • Python 3 (>= 3.7)

You should use a dedicated and non-privileged user account to run this CLI. You could also rely on the packages provided by your GNU/Linux distribution. On a Debian-based host, you can install the following packages:

  • python3-click
  • python3-passlib
  • python3-sqlalchemy, with python3-mysqldb to use a MySQL database or python3-psycopg2 for PostgreSQL
  • python3-tabulate
  • python3-yaml
  • python3-argon2 for Argon2 password hashing (optional)

Finally, you should follow the tutorial to have a working mail setup with Postfix and Dovecot. Note that the database tables will automatically be created by this CLI as needed.

Installation

Via pip

Install it with:

pip3 install --user vmail-cli

Manually (for development)

Clone this repository or download the sources on your local machine, and go into this directory.

Install all requirements with:

pip3 install -e .[test]

Configuration

You can create your local configuration thanks to the wizard:

vmail-cli config init

You will have to create the database and the user if it is not already done. For a MariaDB database, this can be done with:

CREATE DATABASE vmail;
GRANT ALL ON vmail.* TO 'vmail-cli'@'localhost' IDENTIFIED BY 'your-password';

Note that the local configuration is stored in a YAML file loaded by confuse. It should be located in $XDG_CONFIG_HOME/vmail/config.yaml or ~/.config/vmail/config.yaml on GNU/Linux. You could have a look at the default configuration for available parameters.

Usage

Use the --help argument to list available commands with their options:

vmail-cli --help

License

It started as a fork of vmail-manager written by Dominik Rimpf and licensed under the MIT License.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

vmail-cli-1.0.1.tar.gz (11.8 kB view details)

Uploaded Source

Built Distribution

vmail_cli-1.0.1-py3-none-any.whl (10.8 kB view details)

Uploaded Python 3

File details

Details for the file vmail-cli-1.0.1.tar.gz.

File metadata

  • Download URL: vmail-cli-1.0.1.tar.gz
  • Upload date:
  • Size: 11.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.0 importlib_metadata/4.6.4 pkginfo/1.8.2 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.9.9

File hashes

Hashes for vmail-cli-1.0.1.tar.gz
Algorithm Hash digest
SHA256 e32389bc0dcba653d6010af3bc18a3a3d251c70847af5cac720248766a38f51b
MD5 3774bc42c71407b5995a31bd4aefdfcd
BLAKE2b-256 256e15f93bf0e21080f6e69f652186d1d82e6dabc998519effd003df5d9251b0

See more details on using hashes here.

File details

Details for the file vmail_cli-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: vmail_cli-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 10.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.0 importlib_metadata/4.6.4 pkginfo/1.8.2 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.9.9

File hashes

Hashes for vmail_cli-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 7998d36fb6913f41e610876edbe9ebd6609f1a5b4a87e1a118deebf395c89c06
MD5 2ffd8896844c69358eec626d70ed42f9
BLAKE2b-256 b272d1c870f3fcf4ce501e83b7d7edadfdcf865dddf8e2714ca2cf974fcc51c7

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page