# Postal — Self-Hosted Mail Delivery Platform > A fully featured open source mail delivery platform for incoming and outgoing email, comparable to Sendgrid or Mailgun but running on your own servers. ## Install Save as a script file and run: # Postal — Self-Hosted Mail Delivery Platform ## Quick Use ```bash # Install Postal using the official installer git clone https://github.com/postalserver/install /opt/postal/install sudo ln -s /opt/postal/install/bin/postal /usr/bin/postal # Initialize and configure postal bootstrap postal.example.com postal initialize postal make-user # Start the server postal start ``` ## Introduction Postal is an open source mail delivery platform designed for websites and web applications that need to send and receive email at scale. It provides an HTTP API and SMTP server for transactional email delivery, along with click and open tracking, webhook notifications, and a web UI for monitoring — all self-hosted on your own infrastructure. ## What Postal Does - Sends transactional and bulk email via HTTP API or SMTP relay - Tracks message delivery, opens, clicks, and bounces in real time - Manages multiple organizations and mail servers from a single installation - Processes incoming email with routing rules and HTTP forwarding - Provides detailed delivery logs and message retention for debugging ## Architecture Overview Postal is a Ruby on Rails application backed by MySQL for metadata and RabbitMQ for job queuing. Outbound messages flow through a Postfix-like SMTP sender that handles DKIM signing, retry queues, and IP pool rotation. Incoming mail hits Postal's built-in SMTP server, gets processed through routing rules, and can be forwarded to webhooks. A background worker pool handles asynchronous tasks like bounce processing, webhook delivery, and scheduled cleanups. ## Self-Hosting & Configuration - Requires a dedicated server or VM with Docker or native Ruby environment - Set up MySQL and RabbitMQ as backing services before installation - Configure DNS records including MX, SPF, DKIM, and rDNS for deliverability - Use the web UI to create organizations, servers, and API credentials - Deploy behind a reverse proxy (Nginx or Caddy) for TLS termination on the web interface ## Key Features - IP pool management lets you rotate sending IPs to protect reputation - Built-in click and open tracking without third-party dependencies - Webhook notifications push delivery events to your application in real time - Message retention stores sent and received emails for configurable periods - Multi-tenant design supports isolated mail servers per client or project ## Comparison with Similar Tools - **Docker Mailserver** — focused on personal mailboxes (IMAP/SMTP), not transactional delivery - **Mailtrain** — newsletter/campaign tool, not a general mail delivery platform - **Haraka** — high-performance SMTP server in Node.js but without the management UI - **Cuttlefish** — simpler transactional email server with fewer features and less active development ## FAQ **Q: Can Postal replace Sendgrid or Mailgun?** A: For most use cases, yes. It provides the same core features (API sending, tracking, webhooks) but you manage the infrastructure and IP reputation yourself. **Q: How does it handle deliverability?** A: Postal supports DKIM, SPF alignment, bounce processing, and IP warm-up. Deliverability depends on your server's IP reputation and proper DNS configuration. **Q: Does it support incoming email?** A: Yes. Postal can receive email, process it through routing rules, and forward parsed message data to your application via HTTP webhooks. **Q: What are the hardware requirements?** A: A server with 2 CPU cores and 4 GB RAM handles moderate volumes. High-volume senders should scale horizontally with multiple worker processes and dedicated IP addresses. ## Sources - https://github.com/postalserver/postal - https://docs.postalserver.io/ --- Source: https://tokrepo.com/en/workflows/ebddd138-3e47-11f1-9bc6-00163e2b0d79 Author: Script Depot