A single-file, self-hosted private email server with SMTP, POP3 and IMAP support plus a web mail management interface for your own domain.
hyvor/relay
Self-hosted, open-source email API that sends mail over SMTP from your own infrastructure, with logs, bounce handling and webhooks.
Open-source alternative to:SendGrid
Mailgun
Amazon SES
- Stars
- 918
- Forks
- 65
- Open issues
- 56
- Last commit
- 11 hours ago
What is it?
Hyvor Relay is a self-hosted email API for developers that sends messages over SMTP using your own servers and IP addresses. It is aimed at teams that want a transactional and bulk email service similar to hosted providers, but with the infrastructure under their control.
The project covers the operational side of sending mail: queues that separate transactional and distribution emails, greylisting and retry handling, bounce handling, suppressions, and feedback loop integration for spam complaints. It includes a built-in DNS server to automate the records needed for sending, and send logs with SMTP conversations kept for up to 30 days.
For multi-user setups, it supports multiple tenants and isolated projects within a tenant. Monitoring is available through Prometheus metrics and Grafana dashboards. The backend is written in PHP with Symfony, the workers and SMTP server in Go, and the frontend in SvelteKit, with PostgreSQL serving as both database and queue. It is licensed under AGPL-3.0, with commercial licenses offered separately.
Key features
- 01Self-hosted deployment with Docker Compose or Swarm
- 02Email API for sending messages over SMTP
- 03Separate transactional and distribution queues
- 04Automatic greylisting and retry handling
- 05Bounce handling and suppression management
- 06Built-in DNS server to automate sending records
- 07Webhooks for email events
- 08Prometheus metrics and Grafana dashboards
Use cases
- Sending transactional emails such as password resets and receipts from your own servers
- Running a self-hosted replacement for a hosted email API service
- Managing sending for multiple clients or projects from one installation
- Monitoring deliverability with logs, SMTP conversations and metrics
Quick start
- 1
Set up the HYVOR development environment using hyvor/dev
- 2
Start Hyvor Relay locally
./run relay
Things to know
- Licensed under AGPL-3.0, a copyleft license that requires sharing modified source when offered as a network service.
- The README's quick start is a contributor dev setup; self-hosting details are only in external docs.
- Requires running a multi-service stack (PHP/Symfony, Go, SvelteKit, PostgreSQL).
Topics
FAQ
- What is relay?
- Self-hosted, open-source email API that sends mail over SMTP from your own infrastructure, with logs, bounce handling and webhooks. Hyvor Relay is a self-hosted email API for developers that sends messages over SMTP using your own servers and IP addresses. It is aimed at teams that want a transactional and bulk email service similar to hosted providers, but with the infrastructure under their control.
- Is relay free to use? What license does it have?
- relay is open source under the AGPL-3.0 license. Check the license terms before using it in commercial products.
- Is relay still maintained?
- Actively maintained. The last commit to relay was on Oct 21, 2026.
- What can I use relay for?
- Sending transactional emails such as password resets and receipts from your own servers Running a self-hosted replacement for a hosted email API service Managing sending for multiple clients or projects from one installation Monitoring deliverability with logs, SMTP conversations and metrics
- How do I install relay?
- Set up the HYVOR development environment using hyvor/dev Start Hyvor Relay locally: ./run relay
- Where can I get relay?
- The source code and installation instructions are on GitHub: https://github.com/hyvor/relay
Summary generated by AI from the project's README. GitHub stats refresh daily.
Related projects
Open source newsletter tool for sending email campaigns and building sign-up forms, an alternative to Mailchimp.
Self-hosted mail server for your own domain, with SMTP/IMAP/POP3, CardDAV/CalDAV, a React webmail and admin console, deployed via Docker Compose.
Rust library, CLI and HTTP backend that checks whether an email address exists without sending any email.
Self-hostable all-in-one mail and collaboration server in Rust, supporting IMAP, JMAP, POP3, SMTP, CalDAV, CardDAV and WebDAV.
Self-hosted newsletter and mailing list manager shipped as a single Go binary, backed by PostgreSQL.