← Back to Research

AfterSMTP is the next-generation global email and messaging protocol designed to secure internet communication via native cryptography, blockchain-anchored verifiable identities, and multi-stream zero-trust networking.

It acts as a secure, decentralized bridge, allowing a seamless transition from legacy plain-text SMTP to the fully encrypted Advanced Message Protocol (AMP).

Core Features

  • Native End-to-End Encryption: Built deeply on modern cryptographic primitives. All payloads are mathematically locked using X25519 authenticated encryption.
  • Decentralized Identities (DIDs): Email addresses (e.g., user@domain.com) map to did:aftersmtp:domain.com:user. Identities, along with Ed25519 signing keys, are stored on a public Substrate/Merkle-based blockchain transparency log.
  • Proof of Transit: AfterSMTP natively anchors a cryptographic receipt of every message processed into the continuous ledger, stopping spoofing and domain fraud permanently.
  • High-Performance Transport: Employs an out-of-band QUIC (HTTP/3) transport layer over UDP stream-multiplexing for zero-RTT server-to-server TLS 1.3 encrypted data flow alongside a gRPC API.
  • Legacy Hybrid On/Off Ramps: Fully backward compatible with existing MTAs. The gateway forces strict STARTTLS and client-auth on ingress, encapsulates standard MIME bodies natively into AMP format, and enforces powerful egress policies (DANE/TLSA/ DKIM / ARC) when tunneling to legacy addresses.

Project Structure

  • /cmd/aftersmtp: The primary gateway monolithic server.
  • /cmd/aftersmtp-cli: The cross-platform CLI tool for identity management and messaging interactions.
  • /internal/protocol/amp: The native AMP protocol gRPC and QUIC ingress services.
  • /internal/protocol/legacy: The highly secure On-Ramp and Off-Ramp integrations for legacy SMTP software.
  • /internal/crypto: The X25519/Ed25519 payload sealing primitives.
  • /internal/ledger: Substrate blockchain clients (with SQLite-backed fallback features).
  • /internal/security: Strong implementations of DKIM signatures, ARC seals, and DANE/DNSSEC resolution.
  • /library/: SDK bindings enabling integration from Go, Node, Python, and Rust.

Getting Started

Installation

You can build the server and the CLI tools utilizing the standard Go toolchain:

# Build the core monolithic server
go build -o aftersmtp ./cmd/aftersmtp 

# Build the CLI tool
go build -o aftersmtp-cli ./cmd/aftersmtp-cli

Initializing the Fallback Ledger Environment

If a local Substrate blockchain node is not available, the system will degrade gracefully into an SQLite-backed embedded local store (fallback_ledger.db).

To utilize the CLI in this mode, initialize the schema first:

./aftersmtp-cli db init

# Generate your first decentralized identity and encryption key matrix
./aftersmtp-cli keygen msgs.global ryan

# Verify storage
./aftersmtp-cli db list

Documentation

Explore the following documentation files for deep technical understanding: - PROTOCOL.md: Details the mechanics of the AMP protocol, how DNS mapping operates, and the cryptographic layout. - INTEGRATION.md: Guide on marrying existing enterprise mailboxes (Postfix, MS Exchange) into the AfterSMTP ecosystem via hybrid gateways.

Protocol Libraries Let the World Speak AMP

Check the /library/ folder for .proto source-of-truth definitions and generate bindings required for external clients to engage natively in the Next-Generation.