decentralized and secure mail delivery and synchronization

This is the documentation for the leap.mail module. It is a twisted package that allows to receive, process, send and access existing messages using the LEAP platform.

One way to use this library is to let it launch two standard mail services, smtp and imap, that run as local proxies and interact with a remote LEAP provider that offers a soledad syncronization endpoint and receives the outgoing email. This is what Bitmask client does.

From the release 0.4.0 on, it’s also possible to use a protocol-agnostic email public API, so that third party mail clients can manipulate the data layer. This is what the awesome MUA in the Pixelated project is using.

How does this all work?

All the underlying data storage and sync is handled by a library called soledad, which handles encryption, storage and sync. Based on u1db, documents are stored locally as local sqlcipher tables, and syncs against the soledad sync service in the provider.

OpenPGP key generation and keyring management are handled by another leap python library: keymanager.

See the life cycle of a leap email for an overview of the life cycle of an email through LEAP providers.

Data model

The data model at the present moment consists of several document types that split email into different documents that are stored in Soledad. The idea behind this is to keep clear the separation between mutable and inmutable parts, and still being able to reconstruct arbitrarily nested email structures easily.

Indices and tables