{"slug": "mars-mail-auto-reply-service", "title": "Mars: Mail Auto Reply Service", "summary": "An open-source Go terminal UI and CLI called MARS lets users author, manage and run AI-generated MARC (Mail Auto Reply Configuration) rules over IMAP/POP3 and SMTP, using OpenRouter OAuth2 PKCE and SQLite state tracking. MARS sends a plain-language handling strategy to a chosen OpenRouter model via structured tool calling to produce a YAML `.marc` rule file with name, keywords, exclude_keywords, match_mode and auto_reply_message fields, which the user must confirm or reject before it touches the mailbox. The tool tracks per-MARC `last_uid`/`uid_validity` cursors in `~/.mars/mars.db`, caches fetched mail in a separate `~/.mars/cache.db`, retries transient network failures with configurable exponential backoff, and requires Go 1.22+ with CGO disabled since all dependencies are pure Go.", "body_md": "An open-source Go TUI and CLI for authoring, managing, and running AI-generated **MARC** (Mail Auto Reply Configuration) rules over IMAP/POP3 and SMTP with OpenRouter OAuth2 and SQLite state tracking.\n\n**MARS** automates repetitive inbox triage and context-aware email responses without forcing you to maintain brittle mail filter syntax by hand.\n\nYou describe how you want a category of email handled in plain language; MARS sends that strategy to your chosen OpenRouter model with structured tool calling to produce a `.marc` rule file (`name`, `keywords`, `exclude_keywords`, `match_mode`, and `auto_reply_message`). You review and **confirm** or **reject** the generated configuration before it ever touches your mailbox.\n\nOnce active, MARS polls your inbox incrementally via **IMAP** or **POP3**, tracks the last fetched message cursor in **SQLite** so it never redownloads your entire mailbox, retries transient network failures with **exponential backoff**, and dispatches replies via **SMTP**—all inside an interactive terminal UI with a live bottom progress bar or headlessly from the CLI.\n\n- **Support & SLA Triage** : Acknowledge bug reports, billing questions, or onboarding requests with ticket links and expected response windows.\n- **Out-of-Office & Sabbatical Rules** : Send tailored auto-replies depending on topic (e.g., urgent production incidents vs. routine scheduling).\n- **Partnership, Press & Sponsorship Routing** : Automatically direct media or vendor inquiries to the right intake form or contact.\n- **Closed Listings & Waitlists** : Politely notify late applicants for closed roles, full cohorts, or expired RFPs without manual inbox cleanup.\n- **Cold Outreach Filtering** : Decline unsolicited staffing, agency, or sales pitches automatically while excluding newsletters and automated notifications.\n\n- **OpenRouter OAuth2 PKCE & Model Search** : Starts with an OpenRouter OAuth2 PKCE flow (or API key setup), followed by an interactive model picker with live search.\n- **Tool-Called MARC Authoring** : Generates`.marc` configurations via OpenRouter function/tool calling (`generate_marc` ) with explicit user confirmation or rejection.\n- **Per-MARC UID Tracking & SQLite Message Cache (`~/.mars/`)** :\n  - `~/.mars/config.json` — OpenRouter credentials, active model, IMAP/POP3, SMTP, and retry/backoff settings.\n  - `~/.mars/marcs/*.marc` — Human-readable YAML rule files.\n  - `~/.mars/mars.db` — SQLite database indexing all MARC files,**per-MARC**`last_uid` /`uid_validity` cursors, and reply deduplication logs.\n  - `~/.mars/cache.db` — Separate SQLite message cache storing fetched emails locally for instant offline rule evaluation and zero redundant mailbox re-downloads.\n- **Incremental Sync & Exponential Backoff** : Tracks`last_uid` /`UIDL` per mailbox so subsequent runs only inspect new mail, with configurable`max_retries` ,`initial_backoff_ms` ,`max_backoff_ms` , and multiplier.\n- **TUI Progress Status Bar & CLI Mode** : Visual progress bar at the bottom of the TUI during mail fetches, plus full CLI subcommands for cron jobs and servers.\n\nRequires **Go 1.22+** (100% pure Go — no C compiler, `gcc`, or `libc6-dev` required).\n\n```\n# Resolve module checksums and run/build in pure Go mode\nCGO_ENABLED=0 go mod tidy\nCGO_ENABLED=0 go build -o mars ./cmd/mars\n\n# Launch the interactive TUI (OAuth2 -> Model Picker -> Dashboard)\n./mars\n```\n\nOr use the included `Makefile` (`CGO_ENABLED=0` is set automatically):\n\n```\nmake tidy && make run\nmake test\n```\n\n**Note for Linux environments without C headers (`libc6-dev`)**: Always pass `CGO_ENABLED=0` (or run `go env -w CGO_ENABLED=0`). Every dependency in MARS (` modernc.org/sqlite`, `go-imap/v2`, `go-pop3`, `bubbletea`, `cobra`) is pure Go and requires zero CGO.\n\n```\n# Authenticate with OpenRouter via OAuth2 PKCE\n./mars auth\n\n# Generate a new .marc rule from a natural-language strategy (prompts to confirm/reject)\n./mars marc generate \"Acknowledge support and billing emails with a 24-hour SLA notice\"\n\n# List all MARC configurations indexed in ~/.mars/mars.db\n./mars marc list\n\n# Delete a MARC configuration file and remove it from SQLite\n./mars marc delete support-and-billing-triage\n\n# Inspect active model, mail server config, and last fetched UID cursor\n./mars status\n\n# Run one incremental IMAP/POP3 fetch + SMTP auto-reply pass\n./mars sync\nversion: 1\nname: Support & Billing Triage\nslug: support-and-billing-triage\nenabled: true\nmatch_mode: any\nkeywords:\n  - support\n  - billing\n  - invoice\n  - bug report\nexclude_keywords:\n  - unsubscribe\n  - mailer-daemon\nreply_subject_prefix: \"Re: \"\nauto_reply_message: |\n  Thanks for reaching out. We have received your message and routed it to our\n  triage queue. Typical response time is within 1 business day.\ncooldown_hours: 168\nMakefile                       Pure-Go (CGO_ENABLED=0) tidy/build/run/test targets\ncmd/mars/main.go               Cobra CLI + Bubble Tea launcher\ninternal/\n  auth/openrouter.go           OpenRouter OAuth2 PKCE local callback server\n  config/config.go             ~/.mars/config.json & retry policy management\n  mail/fetcher.go              Incremental IMAP/POP3 fetcher, SMTP sender, exponential backoff\n  marc/marc.go                 .marc YAML reader/writer & keyword matcher\n  openrouter/client.go         Model catalog listing & tool-called MARC generation\n  store/sqlite.go              Pure-Go modernc.org/sqlite ~/.mars/mars.db index & cursors\n  tui/app.go                   Bubble Tea TUI screens & bottom fetch progress bar\n```\n\nReleased under the [MIT License](https://github.com/cheikh2shift/mars/blob/main/LICENSE).", "url": "https://wpnews.pro/news/mars-mail-auto-reply-service", "canonical_source": "https://github.com/cheikh2shift/mars", "published_at": "2026-11-23 14:03:12+00:00", "updated_at": "2026-11-23 14:14:36.447325+00:00", "lang": "en", "topics": ["ai-tools", "ai-agents", "developer-tools", "ai-products"], "entities": ["MARS", "OpenRouter", "Go", "SQLite", "IMAP", "SMTP", "POP3", "bubbletea"], "also_reported_by": [], "takeaway": "MARS generates `.marc` YAML rules via OpenRouter tool calling and requires explicit user confirmation before activation, tracking per-MARC `last_uid`/`uid_validity` cursors in SQLite so incremental IMAP/POP3 sync only fetches new mail.", "recommendation": null, "alternates": {"html": "https://wpnews.pro/news/mars-mail-auto-reply-service", "markdown": "https://wpnews.pro/news/mars-mail-auto-reply-service.md", "text": "https://wpnews.pro/news/mars-mail-auto-reply-service.txt", "jsonld": "https://wpnews.pro/news/mars-mail-auto-reply-service.jsonld"}}