https://github.com/goposta/posta
Self-hosted email delivery platform that enables applications to send emails via HTTP APIs while handling SMTP delivery, templates, storage, security, and analytics. Fully self-hostable alternative to services like SendGrid or Mailgun.
https://github.com/goposta/posta
http-to-smtp mail-delivery mailsender mailserver mailtemplate mailtest
Last synced: about 1 month ago
JSON representation
Self-hosted email delivery platform that enables applications to send emails via HTTP APIs while handling SMTP delivery, templates, storage, security, and analytics. Fully self-hostable alternative to services like SendGrid or Mailgun.
- Host: GitHub
- URL: https://github.com/goposta/posta
- Owner: goposta
- License: apache-2.0
- Created: 2026-03-22T08:17:18.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2026-04-28T17:01:03.000Z (about 1 month ago)
- Last Synced: 2026-04-28T19:04:53.506Z (about 1 month ago)
- Topics: http-to-smtp, mail-delivery, mailsender, mailserver, mailtemplate, mailtest
- Language: Go
- Homepage: https://goposta.dev
- Size: 3.77 MB
- Stars: 50
- Watchers: 0
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Security: SECURITY.md
Awesome Lists containing this project
README
# Posta
Self-hosted email delivery platform for developers and teams
[](https://github.com/goposta/posta/actions/workflows/ci.yml)
[](https://goreportcard.com/report/github.com/goposta/posta)
[](https://go.dev/)
[](https://pkg.go.dev/github.com/goposta/posta)
[](https://github.com/goposta/posta/releases)


---
## Overview
**Posta** is a self-hosted email delivery platform that enables applications to send emails via HTTP APIs while handling SMTP delivery, templates, storage, security, and analytics.
It is designed as a developer-first, fully self-hostable alternative to services like SendGrid or Mailgun.
[](https://www.goposta.dev/)
[](https://app.goposta.dev/)
---
## Quick Example
Send your first email:
```bash
curl -X POST http://localhost:9000/api/v1/emails/send \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"from": "hello@example.com",
"to": ["user@example.com"],
"subject": "Hello from Posta",
"html": "
Hello!
"
}'
```
Response:
```json
{
"id": "email_01J8C8E5W3",
"status": "queued"
}
```
---
## Core Features
### Email Delivery
* REST API for transactional, batch, and templated emails
* Attachments, custom headers, and unsubscribe support
* Scheduled sending and preview mode
* Async processing with Redis and Asynq
* Automatic retries and priority queues
### Inbound Email
* Built-in SMTP receiver with TLS
* HTTP webhook ingest with HMAC verification
* Raw message, headers & attachment storage
* Forwarding with status tracking
* Spam scoring & retry on failure
* Real-time SSE stream for inbound notifications
### Templates
* Versioned and multi-language templates
* Variable substitution and stylesheet inlining
* Import/export and preview support
### Campaigns
* Bulk email campaigns with scheduling and subscriber targeting
* Draft, scheduled, sending, paused, and cancelled lifecycle states
* A/B testing with multi-variant splits and per-variant performance metrics
### SMTP & Domains
* Multiple SMTP providers with TLS support
* Shared SMTP pools for teams
* Domain verification (SPF, DKIM, DMARC)
* Verified sender enforcement
### Security
* API keys with expiration, hashing, and IP allowlisting
* JWT authentication and RBAC
* Two-factor authentication (TOTP)
* OAuth / SSO login (Google, Keycloak, authentik, and more)
* Rate limiting and session management
### Contacts & Subscribers
* Contact tracking, lists, and segmentation
* Subscriber lifecycle (active, bounced, unsubscribed)
* Hard/soft bounce and complaint handling
* Automatic suppression lists
### Tracking
* Pixel-based open tracking
* Click tracking with link rewriting
* Per-email engagement metrics
### Workspaces
* Multi-tenant architecture with isolated workspaces
* Role-based access control
* Shared resources and scoped API keys
### Webhooks & Events
* Event-driven architecture with webhook delivery
* Retry strategies and delivery tracking
* Audit logs and real-time event streaming
### Analytics & Monitoring
* Email delivery, open, and click metrics
* Prometheus integration
* Health endpoints and daily reports
### Admin Platform
* User and API key management
* Global metrics and logs
* SMTP pool management
* Platform configuration and retention policies
### Dashboard
* Vue-based UI for managing all resources
* Analytics, templates, SMTP, domains, contacts, campaigns, and logs
* Dark/light mode and user preferences
---
## Architecture
* Backend: Go (Okapi framework)
* Frontend: Vue 3 + Vite
* Database: PostgreSQL
* Queue: Redis + Asynq
* Metrics: Prometheus
---
## Requirements
* Go 1.25+
* PostgreSQL
* Redis
---
## Quick Start
### Docker Compose
```bash
docker compose up -d
```
Access the dashboard:
```
http://localhost:9000
```
Default credentials:
```
Email: admin@example.com
Password: admin1234
```
---
### Local Development
```bash
git clone https://github.com/goposta/posta.git
cd posta
make dev-deps
make dev
make dev-worker
```
---
## API Documentation
* API Reference: [https://app.goposta.dev/docs](https://app.goposta.dev/docs)
* OpenAPI Spec: [https://app.goposta.dev/openapi.json](https://app.goposta.dev/openapi.json)
* Local: `/docs` on your Posta instance
---
# Dashboard
Posta includes a web dashboard for managing templates, SMTP servers, domains, contacts, API keys, and analytics.
### Email Analytics
### Template Detail
### Template Editor
### Admin Platform Metrics
### Admin Platform Metrics (Dark)
---
## Official SDKs
* Go: [https://github.com/goposta/posta-go](https://github.com/goposta/posta-go)
* PHP: [https://github.com/goposta/posta-php](https://github.com/goposta/posta-php)
* Java: [https://github.com/goposta/posta-java](https://github.com/goposta/posta-java)
### Go Example
```go
client := posta.New("https://posta.example.com", "your-api-key")
resp, err := client.SendEmail(&posta.SendEmailRequest{
From: "sender@example.com",
To: []string{"recipient@example.com"},
Subject: "Hello from Posta",
HTML: "
Hello!
",
})
```
---
## Contributing
Contributions are welcome. Please open an issue before submitting a pull request.
---
## License
Apache License 2.0
## Copyright
Copyright (c) 2026 Jonas Kaninda and contributors