Skip to content

python-mailcow

PyPI version pylint

python-mailcow allows you to interact with the MailCow API. It comes with a cli mailcow. All arguments for the cli are generated by parsing your MailCow instance's OpenApi schema.

See demo.mailcow.email as OpenAPI scheme example.

This means that you can add, get, edit and delete everything that the MailCow API allows and changes to the API should be usable immediately.

Installation

  • from pypi: pip install python-mailcow
  • from github: pip install git+https://github.com./derJD/python-mailcow.git

Local Build

git clone https://github.com/derJD/python-mailcow.git
cd python-mailcow
pip install .

Usage

quick start

  • Generate a API token in the MailCow UI
  • mailcow --create-example-config
  • Edit settings in ~/.config/python-mailcow.cfg to match your MailCow UI
  • mailcow --help should now show all available options depending on your MailCow API version

Config

python-mailcow read its settings from ~/.config/python-mailcow.cfg. An example configuration looks like this:

[defaults]
server = demo.mailcow.email
ssl_verify = true
timeout = 5

[demo.mailcow.email]
url = https://demo.mailcow.email
token = 123456-abcde-123456-abcde-123456

Documentation

License

Author


Last update: March 22, 2021