Architecture

Postern's design is based on secure defaults and a Policy Engine.

Policy Engine

Some user or network triggered actions invoke Starlark script hooks. Those hooks can be used for filtering and sorting messages. All currently supported policy hooks are documented under Reference/Hooks.

The Policy Engine's design should allow creative use-cases. At the same time, it implements safeguards:

Messages will always go somewhere. Messages can neither be rejected nor deleted via the Policy Engine.

Sending Emails is not possible via the Policy Engine due to the risk of mail loops. Emails should be generated and submitted either by humans or by dedicated software such as mailing list managers.

Storage

All messages and DKIM keys are stored at rest in encrypted format. A masterkey is used for encryption. The Readme shows how to store it securely on disk with systemd-creds. Encryption uses the Data At Rest Encryption (DARE) format. Metadata (from- and to- addresses, Subjects) are stored in an unencrypted SQLite database. If you consider this data as extremely sensitive, email might not be the right communication medium for you.

TLS everywhere

All network connections are TLS encrypted to preserve privacy. There is one exception for local delivery. If enabled, messages can be submitted without authentication over an unencrypted TCP connection. This is useful for local software such as mailing list managers.

Scalability

Postern is at an early stage of development and not tuned for performance yet.

The design goal is to easily run as an MDA for private users or small organizations. To avoid complexity, Postern will not be developed for distributed-systems use-cases.

Postern will definitely be able to store a few thousand emails on disk and serve a few hundred emails per day. This is in the scale of many private users and small companies. For larger use-cases, Postern might not be the right fit.