Skip to content


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 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.


  • from pypi: pip install python-mailcow
  • from github: pip install git+

Local Build

git clone
cd python-mailcow
pip install .


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


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

server =
ssl_verify = true
timeout = 5

url =
token = 123456-abcde-123456-abcde-123456




Last update: March 22, 2021