logo
0
0
WeChat Login

MoeMail Logo

MoeMail

A resilient temporary email platform rebuilt around Go + SQLite with the same MoeMail frontend.

English简体中文

Modern Stack

MoeMail is now powered by:

  • Frontend: Next.js App Router delivering the existing UI shell.
  • Backend: A Go single-binary that hosts HTTP API, SMTP inbound/outbound, IMAP/POP3 read access, session auth, and cleanup jobs.
  • Database: SQLite (WAL + pragmas) for users, mailboxes, messages, shares, webhook deliveries, API keys, and settings.
  • Mail Flow: Public SMTP for receiving, optional direct SMTP or Resend for sending, IMAP/POP3 read access, raw .eml + attachments stored on disk, and structured metadata in SQLite.
  • Observability: Healthz/ready/metrics endpoints, systemd/nginx assets, and deploy scripts from deploy/.

This repository no longer depends on Cloudflare Email Routing, Workers, D1, KV, or Pages for production functionality.

Running locally

# Go backend cd cmd/moemail go run . # Next frontend (with API rewritten to `MOEMAIL_API_ORIGIN`) cd /workspace npm run dev

Point your browser at http://127.0.0.1:3000 while MOEMAIL_API_ORIGIN targets the running Go service that listens on /api/.

Embedding the frontend into Go

# 1. Export static frontend assets and sync them into internal/webui/out/ npm run build:webui # 2. Build the single Go binary with embedded frontend assets go build ./cmd/moemail

npm run build:webui switches Next into output: "export" mode, generates out/, and copies the result into internal/webui/out/ so //go:embed can bundle the whole UI shell into the Go binary.

Deployment

Match the Go service with systemd or Docker using deploy/systemd/moemail.service, and terminate Cloudflare Workers + Pages. DNS records should point mail.<domain> directly to your Go SMTP listener (no Cloudflare Email Routing proxy). Turnstile may stay if desired, but SMTP reception, authentication, and storage all run inside the Go binary.

About

这是一个基于自定义工作流自动创建的临时仓库

2.69 MiB
0 forks0 stars3 branches20 TagREADMEMIT license
Language
Go63.9%
TypeScript31.4%
Shell4.3%
CSS0.3%
Others0.1%