Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
@rustmailer
rustmailer
Follow
View rustmailer's full-sized avatar
💭
I may be slow to respond.

rustmailer rustmailer

💭
I may be slow to respond.

Block or report rustmailer

Block user

Prevent this user from interacting with your repositories and sending you notifications. Learn more aboutblocking users.

You must be logged in to block users.

Please don't include any personal information such as legal names or email addresses. Maximum 100 characters, markdown supported. This note will be visible to only you.
Report abuse

Contact GitHub support about this user’s behavior. Learn more aboutreporting abuse.

Report abuse
rustmailer/README.md

RustMailer
RustMailer

A self-hosted Email API, built in Rust.

Ask DeepWiki

🎯 Use Cases

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:

  • SaaS platforms requiring multi-account email synchronization
  • CRM systems with automated transactional email sending
  • Marketing automation tools supporting dynamic email templates
  • Customer support software integrating real-time email notifications
  • Enterprise applications needing reliable IMAP and SMTP handling
  • E-commerce platforms managing order confirmation and promotional emails
  • Data analytics solutions tracking email opens and clicks via webhooks
  • Fintech and healthcare systems demanding secure and auditable email workflows

RustMailer enables developers to focus on core application logic without building complex mail infrastructure from scratch.

✨ Features

  • 🌐Modern APIs – Offers both gRPC and OpenAPI interfaces with multi-version API documentation.
  • 🚀High Performance & Cost-Efficient – Written in Rust for safety and speed. Runs with low memory usage, no Redis or external dependencies required — ideal for production at minimal cost.
  • 📬Multi-account IMAP support – Incremental sync using UID-based strategy, supports folder selection, windowed or date-range sync.
  • 📤SMTP Sending – Manage outgoing email via SMTP with connection pooling.
  • 🧾Email Template Support – Supports dynamic email templates for transactional and marketing messages.
  • 📡Flexible MTA Integration – Send via account-specific SMTP servers, self-hosted MTA services, or third-party providers.
  • 📈Open & Click Tracking – Built-in support for tracking email opens and link clicks.
  • 🔄Webhooks with VRL – Send webhook payloads to external systems and process them with VRL scripts for filtering and transformation.
  • 🔌NATS Integration – Push real-time events to NATS for seamless integration with downstream systems.
  • 🖥️Web UI & Client – Includes a built-in web-based email client and admin dashboard.
  • 🔐OAuth2 Support – Built-in OAuth2 flow with web-based authorization UI. Automatically manages access and refresh tokens.
  • 🌍Proxy Support – Supports proxies for IMAP, SMTP, and OAuth2 connections in restricted environments.
  • 🎟️License Required for Deployment – Source-available on GitHub; requires a license key for production use.

📸 Snapshot

RustMailer Snapshot

📦 Installation

🔧 Build from Source

To build RustMailer from source, you need the following prerequisites:

  • Rust ≥ 1.88 (recommended: latest stable)
  • Node.js ≥ 20
  • pnpm (for building Web UI)

Step 1: Clone the repository

git clone https://github.com/rustmailer/rustmailer.gitcd rustmailer

Step 2: Build the Web UI

cd webpnpm installpnpm run buildcd ..

Step 3: Build the Rust backend

cargo build --release

✅ You can now run the binary from ./target/release/rustmailer.

./target/release/rustmailer --rustmailer-root-dir /tmp/data

🐳 Prefer Docker?

If you don’t want to build manually, you can follow the Docker-based installation guide here:📄Install via Docker

🔐 RustMailer comes with a free 14-day trial and supports up to 5 mail accounts without a license. SeeLicense for details.

⚙️ Configuration

RustMailer can be configured via environment variables or command-line arguments parsed by Clap.
The CLI configuration code is located atsrc/modules/settings/cli.rs.
For detailed option descriptions, please refer to theconfiguration reference.

#Root directoryforRustMailer data storageRUSTMAILER_ROOT_DIR=/data/rustmailer_data#HTTP server listening portRUSTMAILER_HTTP_PORT=15630#Enable gRPC serverRUSTMAILER_GRPC_ENABLED=true# gRPC server listening portRUSTMAILER_GRPC_PORT=16630#IP address to bind the server to(0.0.0.0 means all interfaces)RUSTMAILER_BIND_IP="0.0.0.0"#PublicURL of theRustMailer service(usedin links and callbacks)RUSTMAILER_PUBLIC_URL="http://localhost:15630"#Enable logging output to a fileRUSTMAILER_LOG_TO_FILE=true#Enable access token authenticationforAPI requestsRUSTMAILER_ENABLE_ACCESS_TOKEN=true

🧪 API Access

RustMailer exposes both REST (OpenAPI) and gRPC APIs for programmatic access.

You can browse all available API documentation directly via theWeb UI:

🔗OpenAPI Documentation Entry Point:http://localhost:15630/api-docs

It provides links to:

  • Swagger UI:/api-docs/swagger
  • ReDoc:/api-docs/redoc
  • Scalar API Explorer:/api-docs/scalar
  • OpenAPI Explorer:/api-docs/explorer
  • OpenAPI Spec (JSON):/api-docs/spec.json
  • OpenAPI Spec (YAML):/api-docs/spec.yaml

API Docs UI

🧠 Webhooks & NATS

RustMailer supports periodic detection of mail changes (e.g. new messages, flag updates, etc.) using scheduled scans.
It doesnot 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 eitherfull orincremental synchronization, depending on configuration.

Detected events can be forwarded using:

  • Webhooks – Supports payload transformation usingVRL
  • NATS Messages – Also supports VRL scripting for custom routing and filtering

🔧 Each mail account can be configured witheither a webhook or a NATS sink — not both.
🌐 In addition, RustMailer supportsone or more global hooks, which apply to all accounts.

API Docs UI

🖥️ Web Interface

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

🔐 Web UI Access Control

  • IfRUSTMAILER_ENABLE_ACCESS_TOKEN=false (default), the Web UI is accessible without authentication.
  • IfRUSTMAILER_ENABLE_ACCESS_TOKEN=true, access is restricted to requests that provide a validroot token.

The root token file is generated at startup under the directory specified by--rustmailer-root-dir
or theRUSTMAILER_ROOT_DIR environment variable.
The token is stored in a file named:root

⚠️ The root access session expires after 5 days and requires re-authentication.

Login UI

💼 License

RustMailer is source-available. The code is open on GitHub, but requires avalid commercial license key for production use.

Visit:https://rustmailer.com
Documentation:https://docs.rustmailer.com
License Purchase:https://rustmailer.com/pricing

🔐 License Activation Flow

  1. Sign in via Clerk (or OAuth provider).
  2. Purchase license via embedded Stripe Checkout.
  3. License linked to your account email.
  4. Start RustMailer and import your license key through the Web UI settings panel.

import license UI

🧩 Ecosystem Integration

  • 🔍 RustMailer provides a Prometheus exporter exposing over a dozen key monitoring metrics for observability.monitor

  • 📊 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.

🛠️ Tech Stack

Frontend

  • React
  • Vite
  • Shadcn UI
  • Tailwind CSS
  • TanStack (React Query, etc.)

Backend

  • Rust
  • Tokio (async runtime)
  • Poem (web framework)
  • Native_DB (key-value store)
  • mail-send (SMTP client)
  • async-imap (IMAP client)
  • VRL (Vector Remap Language for webhook payload transformation)

📄 License

RustMailer is distributed under acommercial 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 visithttps://rustmailer.com/pricing.


⚠️ Contribution Notice and Disclaimer

At this time, we do NOT accept any Pull Request merges.

Thank you for your understanding and support!

📬 Stay Connected

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

PinnedLoading

  1. rustmailerrustmailerPublic

    A self-hosted Email API, built in Rust

    Rust 2


[8]ページ先頭

©2009-2025 Movatter.jp