Skip to content

goposta/posta

Repository files navigation

Posta

Posta

Self-hosted email delivery platform for developers and teams

CI Go Report Card Go Go Reference GitHub Release Docker Image Size (latest by date) Docker Pulls


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.

Website Try it

Quick Example

Send your first email:

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": "<h1>Hello!</h1>"
  }'

Response:

{
  "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

Templates

  • Versioned and multi-language templates
  • Variable substitution and stylesheet inlining
  • Import/export and preview support

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)
  • Rate limiting and session management

Contacts & Suppression

  • Contact tracking and segmentation
  • Bounce and complaint handling
  • Automatic suppression lists

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 metrics and trends
  • 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, contacts, 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

docker compose up -d

Access the dashboard:

http://localhost:9000

Default credentials:

Email: admin@example.com
Password: admin1234

Local Development

git clone https://github.com/goposta/posta.git
cd posta

make dev-deps
make dev
make dev-worker

API Documentation

  • Swagger UI: /docs
  • ReDoc: /redoc

Dashboard

Posta includes a web dashboard for managing templates, SMTP servers, domains, contacts, API keys, and analytics.

Posta Dashboard

Email Analytics

Email Analytics

Template Detail

Template Detail

Template Editor

Template Editor

Admin Platform Metrics

Admin Platform Metrics

Admin Platform Metrics (Dark)

Admin Platform Metrics Dark


Official SDKs

Go Example

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:    "<h1>Hello!</h1>",
})

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

About

Self-hosted email delivery platform that enables applications to send emails via HTTP APIs while handling SMTP delivery, templates, storage, security, and analytics.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors