Skip to main content

hmailserver-cli

hmctl, the command-line client of hMailServer: administer an hMailServer - on Windows or on Linux, on this machine or another - over its REST API, from any shell.

It is the same hmctl the server's Linux packages install as /usr/bin/hmctl, built from the same file, at the server's version. It is one module with nothing behind it but the Python standard library: installing it fetches nothing else, and it runs no code when it is installed.

Install

pipx install hmailserver-cli

or python -m pip install hmailserver-cli into an environment of your own. Python 3.8 or later.

Use

The server's REST listener must be on. It is off until an administrator turns it on, which hmctl cannot do, since it needs the listener itself: on a Linux server, sudo hmailserver --set-setting RestApiPort=8045 and a restart (CommandLine.md says more).

export HMAIL_URL=https://mail.example.com:8045
export HMAIL_API_KEY="$(cat ~/.config/hmailserver/api.key)"
hmctl domain list
hmctl account list --domain example.com
hmctl queue list
hmctl api GET /api/v1/status

Credentials, in the order they are looked for: --api-key or HMAIL_API_KEY (an API key, sent as a bearer token); --password or HMAIL_PASSWORD, and --password-file or HMAIL_PASSWORD_FILE (the administrator password, sent as HTTP Basic); otherwise a prompt, when there is a console to answer it. An API key is the better answer for anything unattended: it can be read-only, limited to one domain, and revoked without changing the administrator password.

--insecure accepts a certificate nobody verified, and is refused for any host but the loopback address.

Run hmctl with no arguments for the resources, hmctl <resource> --help for one resource's verbs, and hmctl api for any method on any path.

More

Metadata

Release files for hmailserver-cli 6.3.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for hmailserver-cli 6.3.7
File Size Uploaded Provenance
hmailserver_cli-6.3.7.tar.gz 55.2 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for hmailserver-cli 6.3.7
File Interpreter ABI Platform
hmailserver_cli-6.3.7-py3-none-any.whl Python 3 none any Details

Total release size: 111.0 kB

Release files / hmailserver_cli-6.3.7.tar.gz

Download URL hmailserver_cli-6.3.7.tar.gz
Size 55.2 kB
Tags Source
SHA-256 checksum
How to use checksums
bad7f4baecf3a2eeeab29eca507b50526282caa613915c1b07eb1746b727c356
BLAKE2b-256 checksum
How to use checksums
291f816924d8d42f2f4a7e5e9aa29ef19a3dd3bb0b88cafca1542b92907cee67
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.14.7

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitLab CI/CD, verified by PyPI on Oct 21, 2026.

Transparency log

Release files / hmailserver_cli-6.3.7-py3-none-any.whl

Download URL hmailserver_cli-6.3.7-py3-none-any.whl
Size 55.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c217980b094df00a7c1d20bb036e10c168a208a7269df6ba21675ac27a4965d5
BLAKE2b-256 checksum
How to use checksums
9e0532b6c5f0425ec2127658aadb22f9d29392c7398d01debaa373a27a83540e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.14.7

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitLab CI/CD, verified by PyPI on Oct 21, 2026.

Transparency log

Security for hmailserver-cli 6.3.7

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.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for hmailserver_cli-6.3.7.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitLab CI/CD, verified by PyPI on Oct 21, 2026.

Transparency log

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.

Release history Release notifications | RSS feed

This release

6.3.7 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page