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.Protocolwith 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
titlanicommand 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:
- Quick Start -- Core workflow in 6 steps
- Tutorials -- Step-by-step guides for sending messages, running servers, and building clients
- How-To Guides -- Recipes for encryption, verification, GMAP, mailing lists, and more
- CLI Reference -- All
titlanicommands and options - Configuration Reference -- Server and client TOML config
- API Reference -- Python API documentation
License
See LICENSE for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7e76e266e89994454d694be2e69bc0bbdd8142bb3a5aa3caf56f6ad1f13ec769
|
|
| MD5 |
1579f3daade5cdf5dbd08251ef822386
|
|
| BLAKE2b-256 |
710dd175cf16ae83f227d214482b92edda59a98a8675dbcff12d7cfba1b14301
|
Provenance
The following attestation bundles were made for titlani-0.3.0.tar.gz:
Publisher:
release-pypi.yml on alanbato/titlani
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
titlani-0.3.0.tar.gz -
Subject digest:
7e76e266e89994454d694be2e69bc0bbdd8142bb3a5aa3caf56f6ad1f13ec769 - Sigstore transparency entry: 973245136
- Sigstore integration time:
-
Permalink:
alanbato/titlani@f150cb635c8a4bf62419dbad0e33005bae22b90a -
Branch / Tag:
refs/tags/v0.3.0 - Owner: https://github.com/alanbato
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-pypi.yml@f150cb635c8a4bf62419dbad0e33005bae22b90a -
Trigger Event:
push
-
Statement type:
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3fb873f55e1fba0b9e624db5b55bf0f0816d20b3707b5de2769f8adebb6c0cec
|
|
| MD5 |
35b3188ffb7e439987cf079176934321
|
|
| BLAKE2b-256 |
30741951519044c280ad324345ee759c5f60e452118c9cc9a883f9c7da69cd34
|
Provenance
The following attestation bundles were made for titlani-0.3.0-py3-none-any.whl:
Publisher:
release-pypi.yml on alanbato/titlani
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
titlani-0.3.0-py3-none-any.whl -
Subject digest:
3fb873f55e1fba0b9e624db5b55bf0f0816d20b3707b5de2769f8adebb6c0cec - Sigstore transparency entry: 973245165
- Sigstore integration time:
-
Permalink:
alanbato/titlani@f150cb635c8a4bf62419dbad0e33005bae22b90a -
Branch / Tag:
refs/tags/v0.3.0 - Owner: https://github.com/alanbato
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-pypi.yml@f150cb635c8a4bf62419dbad0e33005bae22b90a -
Trigger Event:
push
-
Statement type: