Skip to main content

realtime htop-style monitor for chatmail relays

Project description

cmtop: real-time mail monitor for chatmail relays

cmtop provides an htop-style console interface for monitoring mail traffic and system health on chatmail relays. It tails postfix and dovecot logs to calculate real-time delivery statistics and identifies external domains involved in mail traffic.

Installation

To install use:

uv tool install cmtop

Usage

Interactive TUI

To run the interactive TUI:

cmtop

To override the local domain name used for distinguishing internal versus external traffic:

cmtop --domain example.org

Non-interactive Log Analysis

To analyze a logfile and print a flat summary table:

cmtop -f /path/to/mail.log

You can also pipe journalctl output directly:

journalctl -u postfix@- --no-pager | cmtop -f - --domain mail.example.org

Interactive Controls

  • j or Down Arrow: Move cursor down

  • k or Up Arrow: Move cursor up

  • q: Quit

Developing / Releasing cmtop

  1. Clone the git repository at https://github.com/hpk42/cmtop

  2. Install 'cmtop' in editing mode: uv pip install -e .

  3. Edit code under cmtop/, add tests to tests/ and run pytest, finally commit your changes.

CI checks (ruff lint/format, packaging, pytest) come from the shared chatmail/workflows repository; run them locally with uvx ruff check ., uvx ruff format --check . and pytest.

To release, run the shared release script from a checkout of chatmail/workflows:

python ../workflows/scripts/make_new_release.py

It runs the checks, tests the built wheel, generates the CHANGELOG.md entry with git-cliff and opens it in your editor, then commits, tags vX.Y.Z and pushes. The release.yml workflow builds and publishes to PyPI via trusted publishing (OIDC); no local twine or PyPI token is involved.

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

cmtop-0.2.0.tar.gz (24.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cmtop-0.2.0-py3-none-any.whl (21.0 kB view details)

Uploaded Python 3

File details

Details for the file cmtop-0.2.0.tar.gz.

File metadata

  • Download URL: cmtop-0.2.0.tar.gz
  • Upload date:
  • Size: 24.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for cmtop-0.2.0.tar.gz
Algorithm Hash digest
SHA256 2f4e936819cbd52cf0cb7598b489534e1a5e11feed5d9221de34f09091561848
MD5 7de26f5da6f960295ff2a552fffd3002
BLAKE2b-256 26551c3352be0813a717780aec956368e4583d01bcaa3de7073d0a760cdce701

See more details on using hashes here.

Provenance

The following attestation bundles were made for cmtop-0.2.0.tar.gz:

Publisher: release.yml on hpk42/cmtop

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file cmtop-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: cmtop-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 21.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for cmtop-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 eff25d8ddb46489d5efb077c292543b4459fbf36ad94f9dfdfb60f2df7a4b1af
MD5 639c056cdf55de57c1ab6aab1b32c7ac
BLAKE2b-256 37aa0f756325b8f3426909977dc51973aed48e55b04319e33dc876bf30a0608f

See more details on using hashes here.

Provenance

The following attestation bundles were made for cmtop-0.2.0-py3-none-any.whl:

Publisher: release.yml on hpk42/cmtop

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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