{"id":41012538,"url":"https://github.com/rustmailer/rustmailer","last_synced_at":"2026-03-05T06:02:35.684Z","repository":{"id":305081753,"uuid":"1021537888","full_name":"rustmailer/rustmailer","owner":"rustmailer","description":"A self-hosted Email Middleware for IMAP, SMTP, Gmail API, Graph API — built for developers","archived":false,"fork":false,"pushed_at":"2026-02-11T17:55:48.000Z","size":3798,"stargazers_count":398,"open_issues_count":5,"forks_count":21,"subscribers_count":2,"default_branch":"main","last_synced_at":"2026-02-12T01:55:21.579Z","etag":null,"topics":["email","email-client","email-integration","email-sender","email-template","emailengine","gmail","gmail-api","graph-api","grpc","imap","mail","mailer","openapi","outlook","outlook-365","rust","self-hosted","selfhosted","smtp"],"latest_commit_sha":null,"homepage":"http://rustmailer.com","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rustmailer.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":null,"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"lfx_crowdfunding":null,"polar":null,"buy_me_a_coffee":"rustmailer","thanks_dev":null,"custom":null}},"created_at":"2025-07-17T14:47:29.000Z","updated_at":"2026-02-12T01:10:23.000Z","dependencies_parsed_at":"2025-09-18T00:19:43.169Z","dependency_job_id":"4af67282-8a5f-4368-b42b-cf4df326d176","html_url":"https://github.com/rustmailer/rustmailer","commit_stats":null,"previous_names":["rustmailer/rustmailer"],"tags_count":12,"template":false,"template_full_name":null,"purl":"pkg:github/rustmailer/rustmailer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rustmailer%2Frustmailer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rustmailer%2Frustmailer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rustmailer%2Frustmailer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rustmailer%2Frustmailer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rustmailer","download_url":"https://codeload.github.com/rustmailer/rustmailer/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rustmailer%2Frustmailer/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30111779,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-05T03:40:26.266Z","status":"ssl_error","status_checked_at":"2026-03-05T03:39:15.902Z","response_time":93,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["email","email-client","email-integration","email-sender","email-template","emailengine","gmail","gmail-api","graph-api","grpc","imap","mail","mailer","openapi","outlook","outlook-365","rust","self-hosted","selfhosted","smtp"],"created_at":"2026-01-22T09:08:50.745Z","updated_at":"2026-03-05T06:02:35.638Z","avatar_url":"https://github.com/rustmailer.png","language":"Rust","funding_links":["https://buymeacoffee.com/rustmailer"],"categories":["rust"],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003e\n  \u003cimg src=\"https://github.com/user-attachments/assets/b12d22b2-b8db-4e4c-a89f-3cd99819cedd\" width=\"200\" height=\"142\" alt=\"image\" /\u003e\n  \u003cbr\u003e\n  RustMailer\n  \u003cbr\u003e\n\u003c/h1\u003e\n\n\u003ch3 align=\"center\"\u003e\n  A self-hosted Email Middleware for IMAP, SMTP, and Gmail API — built for developers\n\u003c/h3\u003e\n\n[![Ask DeepWiki](https://deepwiki.com/badge.svg)](https://deepwiki.com/rustmailer/rustmailer)\n[![Docker](https://img.shields.io/docker/v/rustmailer/rustmailer?label=docker)](https://hub.docker.com/r/rustmailer/rustmailer)\n[![](https://github.com/rustmailer/rustmailer/actions/workflows/release.yml/badge.svg)](https://github.com/rustmailer/rustmailer/actions/workflows/release.yml)\n[![Discord](https://img.shields.io/badge/Discord-Join%20Server-7289DA?logo=discord\u0026logoColor=white)](https://discord.gg/3R4scWCsxK)\n\n## 🎯 Use Cases\n\nRustMailer 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 supporting **IMAP/SMTP, and Gmail API**.\n\nTypical use cases and industries include:\n\n- SaaS platforms requiring multi-account email synchronization (IMAP or Gmail)\n- CRM systems with automated transactional email sending  \n- Marketing automation tools supporting dynamic email templates  \n- Customer support software integrating real-time email notifications  \n- Enterprise applications needing reliable IMAP, SMTP, or Gmail API handling  \n- E-commerce platforms managing order confirmation and promotional emails  \n- Data analytics solutions tracking email opens and clicks via webhooks  \n- Fintech and healthcare systems demanding secure and auditable email workflows  \n \n\nRustMailer enables developers to focus on core application logic without building complex mail infrastructure from scratch.\n\n\u003cimg width=\"1141\" height=\"480\" alt=\"image\" src=\"https://github.com/user-attachments/assets/a143096b-e5d4-4966-af03-82eb53003a64\" /\u003e\n\n## 💡 Why RustMailer?\n\nWhile many programming languages provide IMAP, SMTP, or Gmail API client libraries, building a reliable, scalable, and feature-rich mail synchronization and delivery system from scratch remains complex and time-consuming. \nRustMailer abstracts these challenges by offering a unified, self-hosted middleware service that:\n\n- Handles multi-account IMAP polling and caching efficiently  \n- Provides robust SMTP sending capabilities with template support  \n- Manages event dispatch (webhooks, message queues) out of the box  \n- Simplifies integration across diverse application stacks regardless of language  \n\nThis 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.\n\n## ✨ Features\n- 🌐 **Modern APIs** – Offers both gRPC and OpenAPI interfaces with multi-version API documentation.\n- 🚀 **High Performance \u0026 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.\n- 📬 **Multi-account IMAP support** – Incremental sync using UID-based strategy, supports folder selection, windowed or date-range sync.\n- 📤 **SMTP Sending** – Manage outgoing email via SMTP with connection pooling.\n- 📮 **Gmail API Support** – Native integration with Gmail API for account authentication, incremental synchronization, and message sending. Ideal for modern Google Workspace environments.\n- 🧾 **Email Template Support** – Supports dynamic email templates for transactional and marketing messages.\n- 📡 **Flexible MTA Integration** – Send via account-specific SMTP servers, self-hosted MTA services, or third-party providers.\n- 📈 **Open \u0026 Click Tracking** – Built-in support for tracking email opens and link clicks.\n- 🔄 **Webhooks with VRL** – Send webhook payloads to external systems and process them with VRL scripts for filtering and transformation.\n- 🔌 **NATS Integration** – Push real-time events to NATS for seamless integration with downstream systems.\n- 🖥️ **Web UI \u0026 Client** – Includes a built-in web-based email client and admin dashboard.\n- 🔐 **OAuth2 Support** – Built-in OAuth2 flow with web-based authorization UI. Automatically manages access and refresh tokens.\n- 🌍 **Proxy Support** – Supports proxies for IMAP, SMTP, and OAuth2 connections in restricted environments.\n\n\n## 📸 Snapshot\n\n| \u003cimg width=\"1548\" height=\"861\" alt=\"image\" src=\"https://github.com/user-attachments/assets/46e886e5-8f17-4ab5-872e-072686e52d71\" /\u003e| \u003cimg width=\"1552\" height=\"741\" alt=\"image\" src=\"https://github.com/user-attachments/assets/054b1e1e-294e-4af0-a09a-3040552d4f90\" /\u003e|\n|-------------------------------------|--------------------------------|\n| \u003cimg width=\"1553\" height=\"860\" alt=\"image\" src=\"https://github.com/user-attachments/assets/ddd7e1a9-34dc-459b-8701-b59016b8c6e7\" /\u003e| \u003cimg width=\"1551\" height=\"855\" alt=\"image\" src=\"https://github.com/user-attachments/assets/753102d0-7df7-4efb-9099-c5beb6bf0c79\" /\u003e|\n\n## API Reference\n\nhttps://rustmailer.com/redoc\n\n\n## 📦 Installation\n\n### 🔧 Build from Source\n\nTo build RustMailer from source, you need the following prerequisites:\n\n- **Rust** ≥ 1.88 (recommended: latest stable)\n- **Node.js** ≥ 20\n- **pnpm** (for building Web UI)\n\n#### Step 1: Clone the repository\n\n```bash\ngit clone https://github.com/rustmailer/rustmailer.git\ncd rustmailer\n```\n#### Step 2: Build the Web UI\n```bash\ncd web\npnpm install\npnpm run build\ncd ..\n```\n### Step 3: Build the Rust backend\n```bash\ncargo build --release\n```\n\n✅ You can now run the binary from ./target/release/rustmailer.\n\n```bash\n./target/release/rustmailer --rustmailer-root-dir /tmp/data\n```\n\n### 🐳 Prefer Docker?\n![Docker Image Size](https://img.shields.io/docker/image-size/rustmailer/rustmailer/latest?label=Docker%20image%20size)\n\nIf you don’t want to build manually, you can follow the Docker-based installation guide here:\n📄 [Install via Docker](https://rustmailer.com/docs/install/docker)\n```shell\ndocker run -d --name rustmailer -p 15630:15630 -p 16630:16630 -e RUSTMAILER_ROOT_DIR=/data -v /sourcecode/rustmailer_data/:/data rustmailer/rustmailer:latest\n\n```\n\u003e 🔐 RustMailer offers a free 14-day trial with unlimited email accounts during the trial period. See License for details.\n\u003e A valid license key is required for continued use after the trial.\n\n## ⚙️ Configuration\n\nRustMailer can be configured via environment variables or command-line arguments parsed by Clap.  \nThe CLI configuration code is located at `src/modules/settings/cli.rs`.  \nFor detailed option descriptions, please refer to the [configuration reference](https://rustmailer.com/docs/configuration/reference).\n\n\n\n```rust\n# Root directory for RustMailer data storage\nRUSTMAILER_ROOT_DIR=/data/rustmailer_data\n# HTTP server listening port\nRUSTMAILER_HTTP_PORT=15630\n# Enable gRPC server\nRUSTMAILER_GRPC_ENABLED=true\n# gRPC server listening port\nRUSTMAILER_GRPC_PORT=16630\n# IP address to bind the server to (0.0.0.0 means all interfaces)\nRUSTMAILER_BIND_IP=0.0.0.0\n# Public URL of the RustMailer service (used in links and callbacks)\nRUSTMAILER_PUBLIC_URL=http://localhost:15630\n# Enable logging output to a file\nRUSTMAILER_LOG_TO_FILE=true\n# Enable access token authentication for API requests\nRUSTMAILER_ENABLE_ACCESS_TOKEN=true\n```\n\n## 🧪 API Access\nRustMailer exposes both REST (OpenAPI) and gRPC APIs for programmatic access.\n\nYou can browse all available API documentation directly via the **Web UI**:\n\n🔗 **OpenAPI Documentation Entry Point**: [`http://localhost:15630/api-docs`](http://localhost:15630/api-docs)\n\nIt provides links to:\n\n- **Swagger UI**: `/api-docs/swagger`\n- **ReDoc**: `/api-docs/redoc`\n- **Scalar API Explorer**: `/api-docs/scalar`\n- **OpenAPI Explorer**: `/api-docs/explorer`\n- **OpenAPI Spec (JSON)**: `/api-docs/spec.json`\n- **OpenAPI Spec (YAML)**: `/api-docs/spec.yaml`\n\n\u003cimg width=\"1550\" height=\"634\" alt=\"image\" src=\"https://github.com/user-attachments/assets/e39d2292-200f-4eb1-bb81-224b6d979db2\" /\u003e\n\n## 🧠 Webhooks \u0026 NATS\n\nRustMailer supports periodic detection of mail changes (e.g. new messages, flag updates, etc.) using scheduled scans.  \nIt does **not rely on real-time push**, but instead performs full or incremental synchronization at configurable intervals.\n\nMail events are then emitted as:\n\nRustMailer detects mail changes (e.g. new messages, flag updates, etc.) by periodically scanning IMAP folders.  \nIt performs either **full** or **incremental synchronization**, depending on configuration. see details [`https://rustmailer.com/docs/guide/imap-sync`](https://rustmailer.com/docs/guide/imap-sync)\n\nDetected events can be forwarded using:\n\n- **Webhooks** – Supports payload transformation using [VRL](https://www.vrl.dev/)\n- **NATS Messages** – Also supports VRL scripting for custom routing and filtering\n\n\u003e 🔧 Each mail account can be configured with **either** a webhook or a NATS sink — not both.  \n\u003e 🌐 In addition, RustMailer supports **one or more global hooks**, which apply to all accounts.\n\n\u003cimg width=\"1549\" height=\"796\" alt=\"image\" src=\"https://github.com/user-attachments/assets/71477c2f-1ad5-4cd8-884c-6be0867007bd\" /\u003e\n\n## 🖥️ Web Interface\n\nRustMailer includes a lightweight web-based mail client and admin panel, primarily designed to help developers debug and inspect synced mail content.\n\nAccessible at:\n\n```\nhttp://localhost:15630\n```\n### 🔐 Web UI Access Control\n\n- If `RUSTMAILER_ENABLE_ACCESS_TOKEN=false` (default), the Web UI is accessible without authentication.\n- If `RUSTMAILER_ENABLE_ACCESS_TOKEN=true`, access is restricted to requests that provide a valid **root token**.\n\n\u003e The root token file is generated at startup under the directory specified by `--rustmailer-root-dir`  \n\u003e or the `RUSTMAILER_ROOT_DIR` environment variable.  \n\u003e The token is stored in a file named: `root`\n\n\u003e ⚠️ The root access session expires after 5 days and requires re-authentication.\n\nFrom 1.4.0, By default, the Web UI uses username/password authentication:\n```\nDefault username: root\nDefault password: root\n```\nAfter logging in, the user can change the default password through the Web UI.\n\u003cimg width=\"1523\" height=\"677\" alt=\"image\" src=\"https://github.com/user-attachments/assets/a5832f0f-30c2-4c12-beff-5425f7f3b6ab\" /\u003e\n\n## 💼 License\n\nRustMailer is source-available. The code is open on GitHub, but requires a **valid commercial license key** for production use.\n\nVisit: [https://rustmailer.com](https://rustmailer.com)  \nDocumentation: [https://rustmailer.com/docs](https://rustmailer.com/docs)  \nLicense Purchase: [https://rustmailer.com/pricing](https://rustmailer.com/pricing)\n\n## 🔐 License Activation Flow\n\n1. Sign in via Clerk (or OAuth provider).\n2. Purchase license via embedded Stripe Checkout.\n3. License linked to your account email.\n4. Start RustMailer and import your license key through the Web UI settings panel.\n\n\u003cimg width=\"1539\" height=\"756\" alt=\"image\" src=\"https://github.com/user-attachments/assets/9db16684-2961-47bd-bedc-2024b37a7bd1\" /\u003e\n\n\n## 🧩 Ecosystem Integration\n\n- 🔍 RustMailer provides a Prometheus exporter exposing over a dozen key monitoring metrics for observability.\n\u003cimg width=\"1555\" height=\"759\" alt=\"image\" src=\"https://github.com/user-attachments/assets/c87d5d11-cb30-441e-9be5-8fbe233eec79\" /\u003e\n\n\n- 📊 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.\n\n\n## 🛠️ Tech Stack\n#### Frontend\n- React\n- Vite\n- Shadcn UI\n- Tailwind CSS\n- TanStack (React Query, etc.)\n\n#### Backend\n- Rust\n- Tokio (async runtime)\n- Poem (web framework)\n- Native_DB (key-value store)\n- mail-send (SMTP client)\n- async-imap (IMAP client)\n- VRL (Vector Remap Language for webhook payload transformation)\n\n---\n\n## 📄 License\n\nRustMailer is distributed under a **commercial license**.  \nThe source code is publicly available to ensure transparency, allowing users to review, audit, or compile and run it themselves with confidence.  \n\nIf you encounter any issues or have suggestions, please feel free to submit them in the discussions.  \nThe maintainers will consider feedback to fix bugs, improve code quality, or add new features accordingly.  \n\n**Production use requires a valid license key.**  \nFor more details, please visit [https://rustmailer.com/pricing](https://rustmailer.com/pricing).\n\n\n---\n\n## ⚠️ Contribution Notice and Disclaimer\n\n\n**At this time, we do NOT accept any Pull Request merges.**  \n\nThank you for your understanding and support!\n\n\n## 📬 Stay Connected\n\nWe’d love to hear from you! Join our community or follow us for updates:\n\n- 🐦 Twitter: [@rustmailer](https://x.com/rustmailer)\n- 💬 Discord: [Join our community](https://discord.gg/3R4scWCsxK)\n- 📧 Email: [rustmailer.git@gmail.com](mailto:rustmailer.git@gmail.com)\n- 🌐 Website: [https://rustmailer.com](https://rustmailer.com)\n\n\u003e 🚀 Get support, share feedback, and stay informed on the latest RustMailer updates!\n\n\n---\n\n\u003e © 2025 RustMailer — A self-hosted Email Middleware for IMAP, SMTP, and Gmail API, built in Rust\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frustmailer%2Frustmailer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frustmailer%2Frustmailer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frustmailer%2Frustmailer/lists"}