Skip to main content

Misfin(C) mail protocol client and server library

Project description

Titlani

Misfin(C) mail protocol client and server library for Python.

Titlani is a complete implementation of the Misfin(C) mail transport protocol -- a lightweight, privacy-focused mail protocol influenced by Gemini that uses mandatory TLS with self-signed identity certificates and Trust-On-First-Use (TOFU) validation.

Features

  • Full Misfin(C) protocol -- Wire format parsing, status codes, gemmail message format
  • Async client and server -- Built on asyncio.Protocol with TLS, TOFU, redirect handling, and middleware
  • Identity certificates -- Generate and manage Misfin identity certs with custom layout (USER_ID, CN, SAN DNS)
  • At-rest encryption -- Per-mailbox X25519 ECDH + AES-256-GCM encryption for stored messages
  • Sender verification -- Probe-based and SPKI-based verification with SQLite caching
  • GMAP -- Gemini Mailbox Access Protocol for remote mailbox access with tag management
  • Mailing lists -- Server-side mailing list support with subscriber management and message forwarding
  • Rate limiting and access control -- Token bucket rate limiting and IP allow/deny lists via tlacacoca
  • Contact blocking -- Per-mailbox sender block lists
  • Auto-reply -- Server-side out-of-office automatic replies with loop prevention
  • CLI tool -- Full-featured titlani command for sending, serving, reading mail, and administration

Installation

With uv (preferred):

uv tool install titlani 

Or with pip:

pip install titlani

Requires Python 3.13+.

Quick Start

Generate an identity, send a message, and start a server:

# Generate an identity certificate
titlani identity generate alice example.com --blurb "Alice Smith"

# Send a message
titlani send bob@remote.host "Hello from Misfin!" \
    --cert alice.pem --key alice.key --subject "Greetings"

# Generate server and client config interactively
titlani init

# Start a server (auto-discovers config from ~/.config/titlani/)
titlani serve

# List and read your mail
titlani mail list
titlani mail read 1

Or use the Python API:

import asyncio
from titlani import MisfinClient

async def main():
    async with MisfinClient(
        client_cert="alice.pem",
        client_key="alice.key",
    ) as client:
        response = await client.send(
            to="bob@remote.host",
            body="Hello from Misfin!",
            subject="Greetings",
        )
        print(f"{response.status} {response.meta}")

asyncio.run(main())

Documentation

Full documentation is available at titlani.readthedocs.io:

License

See LICENSE for details.

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

titlani-0.1.3.tar.gz (51.2 kB view details)

Uploaded Source

Built Distribution

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

titlani-0.1.3-py3-none-any.whl (71.9 kB view details)

Uploaded Python 3

File details

Details for the file titlani-0.1.3.tar.gz.

File metadata

  • Download URL: titlani-0.1.3.tar.gz
  • Upload date:
  • Size: 51.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for titlani-0.1.3.tar.gz
Algorithm Hash digest
SHA256 5badf8c7695f1297e1185377d7512443af283f0c079ef0199a28b199da861698
MD5 61355674579c11839e3c69c0a2ba9133
BLAKE2b-256 547083b2cb49ccb5732e9663e8a86491af0c2362a6e8156312dc111943ceaead

See more details on using hashes here.

Provenance

The following attestation bundles were made for titlani-0.1.3.tar.gz:

Publisher: release-pypi.yml on alanbato/titlani

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

File details

Details for the file titlani-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: titlani-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 71.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for titlani-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 f25414568a161114057dc454c1313f154d012b4b76552d0ac4c88c30bb527099
MD5 34eb42848774d411f5ea72c2076100cb
BLAKE2b-256 c578f4257b363c8c8c38b2f57d952338a796171c2a1b152e9c5b1aa93663083b

See more details on using hashes here.

Provenance

The following attestation bundles were made for titlani-0.1.3-py3-none-any.whl:

Publisher: release-pypi.yml on alanbato/titlani

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