S3 SES Serverless mail: a self-hosted, single-owner email system on AWS with a Go JMAP backend and an optional AI mail agent.
s3mail lets one owner receive and send mail for a custom domain without running a mail server. It supports many addresses with one account and one unified inbox. AWS managed services handle transport, storage and compute; a Go service speaks the standard JMAP protocol so existing clients can connect.
Why a relay instead of SES for sending: SES in a new AWS account starts in the sandbox, where it sends only to verified addresses and domains, and at most 200 messages per 24 hours. Sending to anyone requires applying to AWS for production access, a manual review that is not guaranteed to succeed. A third-party relay avoids that gate, and because the relay is pluggable, another one can be added later.
s3mail includes an optional AI assistant for your mailbox, built as a LangGraph graph on Amazon Bedrock AgentCore:
agent ask "What did the billing emails this month say?" agent draft "Accept, and suggest Thursday instead." agent act "Archive the newsletters from last week." # prints an approval id agent approve The agent is just another JMAP client. It has its own OAuth client and scopes and no AWS access to mail storage. Mail stays usable without it. When enabled, it sends mail excerpts to an external model API (OpenRouter). See the agent spec and agent/.
You need Go (see go/go.mod), Terraform 1.16.6, golangci-lint, gitleaks and uv. The checks run offline, without an AWS account:
make check # gofmt, go vet, golangci-lint, go test -race, govulncheck, the agent tests, # terraform fmt/validate/test and gitleaks make build # linux/arm64 Lambda zips in go/build/ Path Contents go/ Lambda handlers and the mail-auth, mail-admin and agent CLIs infra/ Terraform roots (bootstrap, main, webmail, agent) and modules with terraform test cases agent/ The optional Python mail agent, its tests and evaluation sets webmail/ Version pins and Dockerfile for the optional browser webmail docs/ Architecture, guides, topic specifications and operations docs Design goals Standard JMAP behavior that works with real clients, with no client-specific shortcuts. Serverless, low-cost operation for personal volume, with all infrastructure in Terraform. Least-privilege IAM for every role, and CI that cannot read mail. Durable, recoverable processing across asynchronous steps; a send with unknown relay acceptance is never retried automatically. Original messages are never deleted, even when an email is removed from the mailbox. Documentation Architecture: five-minute system overview Documentation index: guides, topic specifications and operations docs AGENTS.md: guidance for coding agents working in this repository Contributing and security Contributions are welcome; see CONTRIBUTING.md. Report vulnerabilities privately as described in SECURITY.md, not in public issues. This project follows a code of conduct.




