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.2.0.tar.gz (54.6 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.2.0-py3-none-any.whl (75.9 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for titlani-0.2.0.tar.gz
Algorithm Hash digest
SHA256 304733c332f47d403d345bc8cdf5d80e2e77e2803f7d420bc9321a311d94c6ee
MD5 3b7b67dca95f3435ca02ad7309e3b77c
BLAKE2b-256 2972c4ce07532989cfc4997336452470a12a6ae068b01cc14eeaf488ded1f05f

See more details on using hashes here.

Provenance

The following attestation bundles were made for titlani-0.2.0.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.2.0-py3-none-any.whl.

File metadata

  • Download URL: titlani-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 75.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.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 447bc41b79bfc9e3b752589b55f70076a78e310f7d01d90bba1cdbb23b303a09
MD5 d5506119b5f7e61f05d384e048e233ef
BLAKE2b-256 e30c04a441c655fc049385a7fad6cb94b9e6a22577d916597c348940c9637cb6

See more details on using hashes here.

Provenance

The following attestation bundles were made for titlani-0.2.0-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