Software We Make

Open-source infrastructure software built for mission-critical email operations

πŸ“§

go-emailservice-ads

Enterprise Mail Routing Fabric

Super modern perimeter and internal mail hub system built in Go. Deploy as a next-hop behind Postfix for internal routing, or run in clustered mesh mode for a fully-featured perimeter and internal mail hub combined. Kubernetes-native with enterprise-grade security, compliance monitoring, and disaster recovery capabilities.

8.6M+
Messages/Day
1,050
Workers
<10ms
Processing
31.9MB
Container Size

Key Features

  • βœ“ Multi-tier Queue System - 5 priority tiers with 1,050 workers
  • βœ“ Advanced Security - DANE, SPF, DKIM, DMARC enforcement
  • βœ“ Smart Routing - Divert/Screen Proxy for compliance
  • βœ“ Disaster Recovery - WAL-based crash recovery
  • βœ“ Kubernetes Native - Cloud-ready architecture
  • βœ“ Compliance Ready - GDPR, HIPAA, SEC/FINRA support

Deployment Architectures

πŸ”· Postfix Perimeter Mode

Run Postfix at the perimeter for initial SMTP reception, then forward to go-emailservice-ads as your next-hop internal mail hub.

Internet β†’ Postfix β†’ go-emailservice-ads β†’ Mailboxes

☸️ Clustered Mesh Mode

Deploy as a fully-featured perimeter and internal mail hub in a clustered mesh architecture. No Postfix required.

Internet β†’ go-emailservice-ads cluster β†’ Mailboxes

Technology Stack

πŸ”·
Go 1.23
Core Language
πŸ“¨
SMTP/IMAP
emersion/go-smtp
☸️
Kubernetes
Container Ready
πŸ”
TLS 1.2/1.3
Modern Crypto
πŸ“Š
Prometheus
Metrics Export
🐳
Docker
31.9MB Image

Real-World Use Cases

Legal Holds

Silent mail redirection for investigations without user notification. Complete audit trail with SHA-256 hashing.

Executive Oversight

Transparent BCC monitoring for compliance teams with no header modification or user awareness.

High Volume Processing

Process millions of messages per day with multi-tier queuing and automatic retry scheduling.

Regulatory Compliance

Built-in support for GDPR, HIPAA, and SEC/FINRA requirements with immutable audit logs.

⚑

AfterSMTP Protocol

Next-Generation Mail Transport Protocol

Revolutionary mail protocol using QUIC/HTTP3 transport, gRPC bidirectional streaming, and blockchain-based message verification. Native integration with msgs.global infrastructure for cryptographic identity management, immutable audit trails, and zero-RTT connections.

QUIC
HTTP/3 Transport
Zero-RTT
Connection Start
Blockchain
Audit Trail
gRPC
Native Streaming

Key Features

  • βœ“ QUIC Transport - HTTP/3 with multiplexing and congestion control
  • βœ“ gRPC Streaming - Bidirectional real-time message flow
  • βœ“ Blockchain Ledger - Substrate-based immutable audit trail
  • βœ“ DID Identity - Decentralized identifier management
  • βœ“ Legacy Bridge - Seamless SMTP compatibility layer
  • βœ“ Enhanced Security - MTA-STS, DANE, TLS Reporting, ARC

Protocol Architecture

Transport Layer

QUIC protocol (UDP-based) with multiplexing, zero-RTT, and improved congestion control over legacy TCP.

Application Layer

gRPC with Protocol Buffers for efficient binary serialization and native bidirectional streaming.

Identity Layer

Blockchain-based DID verification with Ed25519 signing keys and X25519 encryption keys.

Audit Layer

Immutable ledger records with SHA256 content hashing for tamper-proof message verification.

πŸ“¨

AMF (ADS Mail Format)

Next-Generation Email Storage Format

Modern, versatile email file format designed to replace .eml, .msg, and .mbox. Built-in compression, encryption, signing, and rich metadata support. JSON-based for easy parsing and extensibility with streaming support for large messages.

60-90%
Compression
2ΞΌs
Create Time
150ΞΌs
Sign/Verify
AES-256
Encryption

Key Features

  • βœ“ JSON-Based - Easy to parse, extend, and debug
  • βœ“ Encryption - AES-256-GCM, PGP, S/MIME support
  • βœ“ Signing - RSA, ECDSA, Ed25519 signatures
  • βœ“ Compression - Gzip/Zstd for 60-90% size reduction
  • βœ“ Rich Metadata - Labels, tags, threading, AI analysis
  • βœ“ Compatible - Convert to/from .eml and .mbox

File Formats

πŸ“„
.amf
JSON (human-readable)
πŸ—œοΈ
.amfz
Compressed (Gzip/Zstd)
⚑
.amfb
Binary (MessagePack)

Advanced Features

Calendar Events

Native iCalendar integration for meeting invitations, RSVPs, and calendar synchronization.

AI Metadata

Sentiment analysis, classification, entity extraction, and automated categorization built-in.

Blockchain Verification

Immutable audit trail with blockchain anchoring for legal compliance and tamper detection.

Streaming Format

JSONL streaming for large messages and incremental processing without memory overhead.

Why Replace .eml and .mbox?

🚫 Old Formats
  • ❌ No encryption
  • ❌ Limited metadata
  • ❌ MIME complexity
  • ❌ Poor compression
✨ AMF Format
  • βœ… Built-in encryption
  • βœ… Rich metadata
  • βœ… JSON simplicity
  • βœ… 60-90% compressed
πŸ”§

MailScript

Universal Email Filtering Engine

Starlark-based mail filtering that runs anywhere. Test offline, process mailboxes, or run as an SMTP proxy gateway. Integrate MailScript into ANY email infrastructure without vendor lock-in. The nuclear option for email filtering.

10K+
Messages/Sec
<1ms
Processing
Starlark
Python-like
~50MB
Memory

Key Features

  • βœ“ Standalone Binary - No dependencies on other mail systems
  • βœ“ SMTP Proxy Mode - Universal gateway for ANY mail server
  • βœ“ Offline Testing - Develop and test rules before production
  • βœ“ gRPC Integration - Non-mail apps can submit messages
  • βœ“ Mailbox Processing - Import and filter mbox/maildir files
  • βœ“ JSON Output - Perfect for CI/CD pipelines

Command Modes

πŸ§ͺ Test Mode

Offline rule testing with custom headers, bodies, and spam scores. Develop filters without production risk.

πŸ“¦ Process Mode

Batch process mbox and maildir files with filtering rules. Perfect for migration and analysis.

πŸš€ Proxy Mode

Full SMTP proxy server on ports 3025/3587. Universal filtering gateway in front of ANY mail server.

πŸ’» REPL Mode

Interactive development environment for rapid prototyping and debugging of filtering rules.

Use Cases

Email Service Providers

Add value-add filtering without touching core infrastructure. Per-customer rule customization.

Corporate Mail Gateway

Enforce content policy and compliance with DLP rules, attachment size limits, and phishing detection.

CI/CD Integration

Validate filtering rules in pipelines with JSON output. Test before production deployment.

Security Research

Analyze spam and phishing patterns in mail archives. Custom detection rules for threat intelligence.

Quick Start

# Install
curl -sSL https://raw.githubusercontent.com/afterdarksys/mailscript/main/install.sh | bash

# Test offline
mailscript test --script=spam-filter.star --from="spam@evil.com" --subject="Buy Now!"

# Process mailbox
mailscript process --script=filter.star --mbox=/var/mail/user --verbose

# Run as SMTP proxy gateway
mailscript proxy --script=filter.star --upstream=mail.example.com:25 --enable-tls

Built for the Community

We believe in open-source infrastructure. Both go-emailservice-ads and AMF are available on GitHub for organizations that need enterprise-grade email infrastructure without vendor lock-in.

Go 1.23
Modern, Type-Safe
β€’
MIT Licensed
Free to Use
β€’
Active Development
Regular Updates

Part of the AfterDark Systems ecosystem

AfterDark Systems β†’