rustmailer
A self-hosted IMAP/SMTP middleware designed for developers
589
RustMailer is designed to be seamlessly integrated into your applications, helping you save development time and improve efficiency by providing a robust, self-hosted email synchronization and delivery backend.
Typical use cases and industries include:
RustMailer enables developers to focus on core application logic without building complex mail infrastructure from scratch.
While many programming languages provide IMAP and SMTP client libraries, building a reliable, scalable, and feature-rich mail synchronization and delivery system from scratch remains complex and time-consuming. RustMailer abstracts these challenges by offering a unified, self-hosted middleware service that:
This allows development teams to focus on core business logic, accelerating time-to-market and reducing maintenance overhead compared to assembling disparate mail client libraries individually.
https://rustmailer.com/redocβ
To build RustMailer from source, you need the following prerequisites:
git clone https://github.com/rustmailer/rustmailer.git
cd rustmailer
cd web
pnpm install
pnpm run build
cd ..
cargo build --release
β You can now run the binary from ./target/release/rustmailer.
./target/release/rustmailer --rustmailer-root-dir /tmp/data
If you donβt want to build manually, you can follow the Docker-based installation guide here: π Install via Dockerβ
π RustMailer offers a free 14-day trial with unlimited email accounts during the trial period. See License for details. A valid license key is required for continued use after the trial.
RustMailer can be configured via environment variables or command-line arguments parsed by Clap.
The CLI configuration code is located at src/modules/settings/cli.rs.
For detailed option descriptions, please refer to the configuration referenceβ .
# Root directory for RustMailer data storage
RUSTMAILER_ROOT_DIR=/data/rustmailer_data
# HTTP server listening port
RUSTMAILER_HTTP_PORT=15630
# Enable gRPC server
RUSTMAILER_GRPC_ENABLED=true
# gRPC server listening port
RUSTMAILER_GRPC_PORT=16630
# IP address to bind the server to (0.0.0.0 means all interfaces)
RUSTMAILER_BIND_IP="0.0.0.0"
# Public URL of the RustMailer service (used in links and callbacks)
RUSTMAILER_PUBLIC_URL="http://localhost:15630"
# Enable logging output to a file
RUSTMAILER_LOG_TO_FILE=true
# Enable access token authentication for API requests
RUSTMAILER_ENABLE_ACCESS_TOKEN=true
RustMailer exposes both REST (OpenAPI) and gRPC APIs for programmatic access.
You can browse all available API documentation directly via the Web UI:
π OpenAPI Documentation Entry Point: http://localhost:15630/api-docsβ
It provides links to:
/api-docs/swagger/api-docs/redoc/api-docs/scalar/api-docs/explorer/api-docs/spec.json/api-docs/spec.yamlRustMailer supports periodic detection of mail changes (e.g. new messages, flag updates, etc.) using scheduled scans.
It does not rely on real-time push, but instead performs full or incremental synchronization at configurable intervals.
Mail events are then emitted as:
RustMailer detects mail changes (e.g. new messages, flag updates, etc.) by periodically scanning IMAP folders.
It performs either full or incremental synchronization, depending on configuration. see details https://rustmailer.com/docs/guide/imap-syncβ
Detected events can be forwarded using:
π§ Each mail account can be configured with either a webhook or a NATS sink β not both.
π In addition, RustMailer supports one or more global hooks, which apply to all accounts.
RustMailer includes a lightweight web-based mail client and admin panel, primarily designed to help developers debug and inspect synced mail content.
Accessible at:
http://localhost:15630
RUSTMAILER_ENABLE_ACCESS_TOKEN=false (default), the Web UI is accessible without authentication.RUSTMAILER_ENABLE_ACCESS_TOKEN=true, access is restricted to requests that provide a valid root token.The root token file is generated at startup under the directory specified by
--rustmailer-root-dir
or theRUSTMAILER_ROOT_DIRenvironment variable.
The token is stored in a file named:root
β οΈ The root access session expires after 5 days and requires re-authentication.
RustMailer is source-available. The code is open on GitHub, but requires a valid commercial license key for production use.
Visit: https://rustmailer.comβ
Documentation: https://rustmailer.com/docsβ
License Purchase: https://rustmailer.com/pricingβ
π RustMailer provides a Prometheus exporter exposing over a dozen key monitoring metrics for observability.
π Webhooks can forward new mail events to NATS; currently, downstream integrations (e.g., writing to ClickHouse or search engines) are not provided but may be offered in future advanced license editions based on user feedback.
RustMailer is distributed under a commercial license.
The source code is publicly available to ensure transparency, allowing users to review, audit, or compile and run it themselves with confidence.
If you encounter any issues or have suggestions, please feel free to submit them in the discussions.
The maintainers will consider feedback to fix bugs, improve code quality, or add new features accordingly.
Production use requires a valid license key.
For more details, please visit https://rustmailer.com/pricingβ .
At this time, we do NOT accept any Pull Request merges.
Thank you for your understanding and support!
Weβd love to hear from you! Join our community or follow us for updates:
π Get support, share feedback, and stay informed on the latest RustMailer updates!
Β© 2025 RustMailer β A self-hosted Email API, built in Rust
Content type
Image
Digest
sha256:ffbba7f31β¦
Size
51.9 MB
Last updated
3 months ago
docker pull rustmailer/rustmailer