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.3.0.tar.gz (59.7 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.3.0-py3-none-any.whl (82.0 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for titlani-0.3.0.tar.gz
Algorithm Hash digest
SHA256 7e76e266e89994454d694be2e69bc0bbdd8142bb3a5aa3caf56f6ad1f13ec769
MD5 1579f3daade5cdf5dbd08251ef822386
BLAKE2b-256 710dd175cf16ae83f227d214482b92edda59a98a8675dbcff12d7cfba1b14301

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: titlani-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 82.0 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.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3fb873f55e1fba0b9e624db5b55bf0f0816d20b3707b5de2769f8adebb6c0cec
MD5 35b3188ffb7e439987cf079176934321
BLAKE2b-256 30741951519044c280ad324345ee759c5f60e452118c9cc9a883f9c7da69cd34

See more details on using hashes here.

Provenance

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