Skip to main content

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.

Metadata

Release files for titlani 0.4.0

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

Source distribution (sdist)

Source distribution for titlani 0.4.0
File Size Uploaded Provenance Actions
titlani-0.4.0.tar.gz 63.8 kB With provenance Details for titlani-0.4.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for titlani 0.4.0
File Interpreter ABI Platform Actions
titlani-0.4.0-py3-none-any.whl Python 3 none any Details for titlani-0.4.0-py3-none-any.whl

Total release size: 146.6 kB

Release files / titlani-0.4.0.tar.gz

Download URL titlani-0.4.0.tar.gz
Size 63.8 kB
Tags Source
SHA-256 checksum
How to use checksums
543932d3a3d073a4cd0924058bc1e0d39f7c5febd81b4475f44c8e38a5db953c
BLAKE2b-256 checksum
How to use checksums
3fb09d095f337d22627649bb00f3bd9d3f20557f53bc7addd44af28c43bf6dcf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 GitHub Actions, verified by PyPI on Oct 17, 2026.

Transparency log

Release files / titlani-0.4.0-py3-none-any.whl

Download URL titlani-0.4.0-py3-none-any.whl
Size 82.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5f9b24c4df8675ac1758c4ff26cab512237eb035b21a70daab2f939726ca2dfc
BLAKE2b-256 checksum
How to use checksums
4fa3a2ca057e574831ccdd5583dc05f18ba001d761d9ad1a7ed2cec7ed6aabb1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 GitHub Actions, verified by PyPI on Oct 17, 2026.

Transparency log

Security for titlani 0.4.0

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 titlani-0.4.0.tar.gz

PyPI Publish Attestation

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

Signed by GitHub Actions, verified by PyPI on Oct 17, 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.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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