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
, withpython3-mysqldb
to use a MySQL database orpython3-psycopg2
for PostgreSQLpython3-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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for vmail_cli-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | edb63b8634e2df7f9804261c3bf6c194bbd2c538ca6a6109ff4a688bc8f4d6c6 |
|
MD5 | 477b82219892d5884e4854063e6b0a45 |
|
BLAKE2b-256 | 03e3c19abd582fe921c6163a5d574894f1a30b269353fae80db089e63a1764e6 |