Self-hosted email delivery platform: send transactional mail over HTTP, with routing, templates and an outbox.
Open-source alternatief voor SendGrid
Self-hosted email delivery platform: send transactional mail over HTTP, with routing, templates and an outbox.
READMEgoposta/posta op GitHub
Posta is a self-hosted, developer-first email platform that handles outbound, inbound, and relayed email — driven by a single HTTP API, with SMTP available for the paths that need it.
It is designed as a fully self-hostable alternative to services like SendGrid, Mailgun, and Postmark — giving you complete ownership of your email infrastructure, data, and deliverability.
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": "Acme <[email protected]>",
"to": ["Jonas Kaninda <[email protected]>","[email protected]"],
"subject": "Hello from Posta",
"html": "<h1>Hello!</h1>"
}'
The
from,to, and other address fields accept a plain address ([email protected]) or RFC 5322 display-name format (Acme <[email protected]>).
Response:
{
"id": "0ae4b04e-5c64-4b2f-bad6-460f8d5d98b3",
"status": "queued"
}
Receive a website form submission — no JavaScript, no backend of your own:
<form action="http://localhost:9000/api/v1/f/YOUR_FORM_KEY" method="POST">
<input type="email" name="email" required>
<textarea name="message" required></textarea>
<button type="submit">Send</button>
</form>
The submission is scanned, stored, and shown in the dashboard, where a person replies to the sender. There is no auto-responder.
POST /api/v1/f/{key}, no API key on the pagePOSTA_MESSAGES_ENABLEDchat.* webhook eventsPOSTA_CHAT_ENABLEDList-Unsubscribe headeremail.unsubscribed webhook eventPosta ships as a single binary that runs in two modes: posta serves the HTTP API,
dashboard, website widgets, and SMTP listeners; posta worker consumes the job queue. Both
modes are stateless — all state lives in the shared PostgreSQL, Redis, and object storage —
so you can run as many servers and workers as your traffic and send volume need.
flowchart LR
App["Your app<br/>REST API / SMTP client"]
MX["Inbound mail<br/>MX delivery"]
Site["Your website<br/>forms, surveys and signups<br/>live chat widget"]
Team["Your team<br/>dashboard · chat inbox"]
subgraph posta["Posta"]
Server["<b>posta</b><br/>HTTP API :9000 · Dashboard<br/>Form and chat APIs · widget scripts<br/>Inbound SMTP :2525 · Relay :2526"]
W1["<b>worker 1</b><br/>asynq consumer"]
W2["<b>worker 2</b><br/>asynq consumer"]
end
subgraph shared["Shared state"]
Redis[("Redis<br/>Asynq queues + scheduler<br/>realtime pub/sub")]
PG[("PostgreSQL<br/>emails · templates · contacts<br/>messages · responses · chats")]
Blob[("Object storage<br/>S3-compatible or filesystem<br/>attachments · raw inbound · chat files")]
end
Providers["SMTP providers<br/>outbound delivery"]
Hooks["Your webhook<br/>endpoints"]
App --> Server
MX --> Server
Site <-->|"posts · SSE"| Server
Team <-->|SSE| Server
Server -- enqueue --> Redis
Server <-->|pub/sub| Redis
Redis -- dequeue --> W1
Redis -- dequeue --> W2
Server <--> PG
W1 <--> PG
W2 <--> PG
Server -.-> Blob
W1 & W2 -.-> Blob
W1 & W2 --> Providers
W1 & W2 --> Hooks
Running the API without a dedicated worker works for evaluation, but production
deployments should split them so sending, retries, campaigns, and scheduled jobs scale
independently of request traffic — see
deploy/compose/docker-compose-full.yml.
Object storage is optional (dashed above). With POSTA_BLOB_PROVIDER unset, attachments
and raw inbound messages stay in the database; point it at s3 or fs to move them out.
Any multi-node deployment should use s3 — a local fs path is not shared between the
server and its workers.
Forms and live chat run on your own site from scripts Posta serves, with a public key per form or widget and no API key on the page.
/widget/v1/posta-form.js renders the form, or a plain
HTML form posts to /api/v1/f/{key}. Contact messages land in the shared inbox; surveys,
registrations and signups are kept as responses, summarised per question. Notifications,
replies and webhooks go out through the worker./widget/v1/posta-chat.js talks to the visitor API under /api/v1/chat/{key}.
Visitors and agents follow a conversation over server-sent events; any server can hold
the stream, because messages, typing and presence travel between servers through Redis
pub/sub. Replies to visitors who have left, and alerts about waiting visitors, are
emailed by the worker.Both are off by default, behind POSTA_MESSAGES_ENABLED and POSTA_CHAT_ENABLED, and
check the page's origin against each form's or widget's allowlist.
docker compose up -d
Access the dashboard:
http://localhost:9000
Default credentials:
Email: [email protected]
Password: admin1234
git clone https://github.com/goposta/posta.git
cd posta
make dev-deps
make dev
make dev-worker
Every Posta instance serves its own interactive API documentation:
/docs on your Posta instance/openapi.json on your Posta instancePosta includes a web dashboard for managing templates, SMTP servers, domains, contacts, forms, live chat, API keys, and analytics.
Posta is available in the Miabi Marketplace as a ready-to-run template, deployed with a dedicated worker so queued sending, automatic retries, campaigns, and scheduled jobs work from the start.
This is still self-hosted Posta — your own instance, your data, the same AGPL-3.0 build. You just skip the setup: no Docker Compose to write, no services to wire together. Miabi deploys and manages it for you.
package main
import (
"fmt"
"log"
posta "github.com/goposta/posta-go"
)
func main() {
client := posta.New("https://posta.example.com", "your-api-key")
resp, err := client.Emails.Send(&posta.SendEmailRequest{
From: "[email protected]",
To: []string{"[email protected]"},
Subject: "Hello from Posta",
HTML: "<h1>Hello!</h1><p>This is a test email.</p>",
})
if err != nil {
log.Fatal(err)
}
fmt.Printf("Email sent: id=%s status=%s\n", resp.ID, resp.Status)
}
Posta is free and open source, but running it in public is not. Your support helps cover:
goposta.dev domainIf Posta is useful to you or your team, a contribution helps keep these online and gives more time for new features and fixes.
Other ways to help, at no cost:
Contributions are welcome. Please open an issue before submitting a pull request, and read CONTRIBUTING.md for the development setup, checks and licensing terms.
Posta is free and open-source software licensed under the GNU Affero General Public License v3.0 or later (AGPL-3.0-or-later).
Enterprise features are built with the enterprise tag and require a valid commercial license. LICENSING.md has the full breakdown.
Copyright (c) 2026 Jonas Kaninda
With official support for Linux, and Web.
Laatst bijgewerkt vanaf GitHub: 4 uur geleden
GitHub-cijfers worden een paar keer per dag ververst.
Log in of maak een account aan om te reageren.
Nog geen reacties. Wees de eerste.
Laat het zien: een live kaart met je positie en beoordeling, die zichzelf bijwerkt.
Liever de kleine? Voeg toe: ?style=flat