MCPSERV.CLUB
Postal

Postal

Self-Hosted

Open‑source mail delivery like SendGrid or Mailgun

Active(95)
16.0kstars
0views
Updated 21 days ago
Postal screenshot 1
1 / 2

Overview

Discover what makes Postal powerful

Postal is a full‑stack, open‑source mail delivery platform engineered for developers who need granular control over email infrastructure. From the moment an SMTP client connects to a POST request on its REST API, Postal processes, queues, and routes messages through a highly configurable pipeline that includes anti‑spam engines, IP pool management, and webhook callbacks. The system is designed to be horizontally scalable; workers can be added behind a load balancer, and message queues are persisted in PostgreSQL so that state survives restarts or node failures.

SMTP & API Delivery

Queueing & Retry

IP Pool Management

Spam & AV Integration

Overview

Postal is a full‑stack, open‑source mail delivery platform engineered for developers who need granular control over email infrastructure. From the moment an SMTP client connects to a POST request on its REST API, Postal processes, queues, and routes messages through a highly configurable pipeline that includes anti‑spam engines, IP pool management, and webhook callbacks. The system is designed to be horizontally scalable; workers can be added behind a load balancer, and message queues are persisted in PostgreSQL so that state survives restarts or node failures.

Architecture

Postal is built with Elixir on the BEAM VM, leveraging Phoenix for its web interface and API layer. The core runtime is a set of supervised worker processes that handle SMTP, HTTP, and queue consumption. Data persistence uses PostgreSQL for relational metadata (domains, users, logs) and Redis for lightweight pub/sub and rate‑limiting counters. Email bodies are stored as attachments in a local or S3‑compatible object store, allowing the system to keep logs without bloating the database. The architecture is intentionally modular: IP pools, spam filters (SpamAssassin, rspamd, ClamAV), and webhook endpoints are all plug‑in points that can be swapped or extended without touching the core codebase.

Core Capabilities

  • SMTP & API Delivery – Accepts standard SMTP traffic and provides a JSON‑based REST API for programmatic sending.
  • Queueing & Retry – Uses exponential backoff and configurable retry windows; workers can be scaled independently.
  • IP Pool Management – Allows sending from multiple IP addresses, automatically rotating to maintain reputation and bypass rate limits.
  • Spam & AV Integration – Hooks into external engines; results are stored in delivery logs and can trigger webhook callbacks.
  • Webhooks & Callbacks – Exposes endpoints for delivery status, bounces, and clicks; developers can subscribe to events via a simple subscription API.
  • Development Mode – A flag that holds outbound messages in a “hold” state, enabling local testing without external spam filters.

Deployment & Infrastructure

Postal is distributed as a Docker image, making it straightforward to deploy in Kubernetes or any container orchestration platform. The docker-compose.yml includes services for the web/API server, worker pool, PostgreSQL, Redis, and optional object storage. For high‑availability, replicas of the API server share a common PostgreSQL cluster and Redis instance; worker nodes can be added on demand to process growing queues. The system exposes health checks and metrics via Prometheus exporters, allowing integration with existing observability stacks.

Integration & Extensibility

Developers can extend Postal through its plugin architecture: custom modules written in Elixir can hook into the message lifecycle (pre‑send, post‑receive, delivery). The REST API is fully documented with OpenAPI specs, enabling automated client generation. Webhooks can target any HTTP endpoint, and the system supports JSON‑payload filtering to reduce noise. Additionally, Postal’s CLI exposes commands for domain and user management, making it a convenient tool in CI/CD pipelines.

Developer Experience

Postal’s documentation is comprehensive and versioned, with a dedicated FAQ section and an active Discord community. Configuration is driven by environment variables and a clear postal.yml file, allowing developers to bootstrap new instances with minimal friction. The web UI provides real‑time logs and analytics, while the API offers programmatic access for full automation. The open‑source license (MIT) removes vendor lock‑in, and the active issue tracker ensures rapid response to feature requests or bugs.

Use Cases

  • Web Applications that require reliable transactional email (password resets, notifications) without relying on third‑party services.
  • Enterprise Email Gateways where compliance mandates hosting all email traffic in‑house.
  • SaaS Platforms that need to send bulk marketing emails from multiple IPs while maintaining deliverability.
  • Testing Environments that use the development mode to capture and inspect outgoing mail without external delivery.

Advantages

Postal offers developers performance (Elixir’s lightweight processes), flexibility (full control over IP rotation and spam filtering), and cost efficiency (self‑hosted, no per‑message fees). Its modular architecture allows teams to replace or augment components (e.g., swap rspamd for a custom ML‑based spam filter) without refactoring the entire stack. Because it’s open source, teams can audit the code for security and compliance concerns, a critical requirement in regulated industries.

Open SourceReady to get started?

Join the community and start self-hosting Postal today

Weekly Views

Loading...
Support Us

Featured Project

$30/month

Get maximum visibility with featured placement and special badges

Repository Health

Loading health data...

Information

Category
apis-services
License
MIT
Stars
16.0k
Technical Specs
Pricing
Open Source
Database
PostgreSQL
Docker
Official
Min RAM
1GB
Min Storage
5GB
Supported OS
LinuxDocker
Author
postalserver
postalserver
Last Updated
21 days ago