OpenMailer is a self-hosted email platform built with Spring Boot, PostgreSQL, Redis, Thymeleaf, and Tailwind CSS.
OpenMailer is designed for teams that want to run email operations on their own infrastructure instead of relying fully on third-party SaaS tools.
It separates a few core concerns:
- application logic and UI in Spring Boot
- persistent data in PostgreSQL
- transient/cache workloads in Redis
- reverse proxy and TLS at the VPS edge
- Templates define reusable email content.
- Campaigns use templates plus recipients to send bulk email.
- Domains control verified sender identities and DNS records.
- Providers handle outbound delivery such as SMTP or external email services.
- Java 25
- Spring Boot
- PostgreSQL
- Redis
- Thymeleaf
- Tailwind CSS
- Docker Compose
Install dependencies:
npm installRun the app:
./mvnw spring-boot:runRun Tailwind in watch mode:
npm run watch:cssApp URL:
http://localhost:8080
Compile:
./mvnw compileRun tests:
./mvnw testPackage:
./mvnw clean packageDeploys are designed for a VPS with Docker Compose.
Main files:
deploy/compose.prod.yml.github/workflows/deploy-prod.ymlarchitecture/DEPLOY.md
On the VPS, the app runs behind a reverse proxy and is exposed internally on:
127.0.0.1:8080
In production, the usual request flow is:
Client -> reverse proxy / WAF -> OpenMailer app -> PostgreSQL / Redis
src/main/java— backend codesrc/main/resources/templates— Thymeleaf viewssrc/main/resources/static— CSS, JS, imagessrc/test/java— testsarchitecture— deployment and progress docs
- Use
openmailer.envon the VPS for production environment variables. - CI/CD should update only
openmailer-app. - Custom error pages live under
src/main/resources/templates/error.