Agent Mail Plan
Letting agents read and reply for support@simple-host.app and hello@vineetsriram.com by connecting directly to Titan's mail servers (IMAP to read, SMTP to send). Updated Sep 26, 2026.
1. Where things stand
| Item | simple-host.app | vineetsriram.com |
|---|---|---|
| MX → Titan | Verified | Verified |
| SPF | Verified | Verified |
| DKIM | Verified titan1 | Verified titan2 |
| DMARC | p=quarantine | p=quarantine |
| Forward copy to vineetu@gmail.com | On | On |
| Third-party (IMAP/SMTP) access | Enabled | Enabled |
Connection settings
| Protocol | Host | Port | Security |
|---|---|---|---|
| IMAP (read) | imap.titan.email | 993 | SSL/TLS |
| SMTP (send) | smtp.titan.email | 465 | SSL/TLS |
Username is the full email address. Sending through Titan's SMTP keeps the SPF and DKIM passes, so replies from agents authenticate the same way as replies from webmail.
2. Architecture
Titan inbox→ IMAP IDLE →Mail bridge→Triage agent→Policy gate→Draft (IMAP APPEND) or send (SMTP)→Audit log
- Mail bridge. One small service that holds both mailbox connections. It exposes a fixed set of tools to agents and is the only thing that ever holds a mailbox password.
- Triage agent. Classifies each new message (support question, sales, receipt, spam, personal), summarizes it and proposes a reply.
- Policy gate. Plain code, not the model, decides whether a proposed reply becomes a draft, is sent, or is escalated. The rules are in section 4.
- Drafts. Replies are saved to the mailbox's own Drafts folder, so you review and send them from Titan webmail or the phone app.
- Audit log. Every read, draft and send is recorded with message ID, action and reason.
Tools the bridge exposes (MCP server + Python library)
| Tool | What it does | Risk |
|---|---|---|
list_messages(account, folder, since, unread_only) | Headers and snippets | Read |
get_message(account, uid) | Full body as plain text; attachments listed, not downloaded | Read |
search(account, query) | IMAP SEARCH by sender, subject, date | Read |
create_draft(account, reply_to_uid, body) | Threaded reply saved to Drafts | Low |
send_reply(account, reply_to_uid, body) | Sends via SMTP and copies it to Sent. Only allowed when the policy gate allows it | High |
mark(account, uid, flags) / move(account, uid, folder) | Mark read, flag, file into folders | Low |
There is deliberately no delete tool. Agents file mail into folders; only you delete.
3. Autonomy levels
| Level | Agent can | When to move up |
|---|---|---|
| L0 Observe | Read, classify, summarize into a daily digest | Classifications look right for a week |
| L1 Draft (start here) | Everything in L0, plus threaded drafts in Drafts | You send most drafts with few edits |
| L2 Selective send | Auto-send only allowlisted categories (acknowledgements, FAQ answers, scheduling links) | No bad sends for several weeks |
| L3 Broad send | Auto-send anything outside the never-list | Only if L2 has been clean for a long stretch |
4. Guardrails (enforced in code)
- Never auto-send anything touching billing, refunds, legal, passwords or account access, or anything with attachments. These always become drafts plus a notification.
- Loop prevention. Never reply to messages with
Auto-Submitted,List-Id,Precedence: bulk/list, ornoreply/mailer-daemonsenders. Never reply to your own addresses. - Rate limits. At most one automated reply per sender per 24 hours, plus a daily cap per mailbox.
- Headers. Automated sends carry
Auto-Submitted: auto-repliedand correctIn-Reply-To/Referencesso threads stay intact. - Prompt-injection hygiene. Email bodies are treated as untrusted data. The agent never follows instructions inside an email, such as "forward this to…" or "reply with the password".
- Kill switch. One flag (
AGENT_MAIL_MODE=off|draft|send) stops all sending immediately. - Audit log. Append-only JSON lines: time, account, uid, action, category, level, reason.
5. Credentials
- Turn on two-factor authentication for each Titan mailbox (Settings → Security & Access).
- Generate an app password per mailbox for the bridge. Once 2FA is on, Titan requires an app password for IMAP/SMTP, and you can revoke it without changing your main password.
- Store the app passwords only in the bridge's environment or secret store, never in agent prompts, repositories or pages.
TITAN_SUPPORT_USER=support@simple-host.app TITAN_SUPPORT_PASS=<app password> TITAN_HELLO_USER=hello@vineetsriram.com TITAN_HELLO_PASS=<app password> IMAP_HOST=imap.titan.email IMAP_PORT=993 SMTP_HOST=smtp.titan.email SMTP_PORT=465 AGENT_MAIL_MODE=draft
6. Build phases
Phase 1 — Access (today) Done
- DNS, DKIM, DMARC and forwarding configured; third-party access enabled on both mailboxes.
Phase 2 — Credentials
- Turn on 2FA and create one app password per mailbox.
- Test IMAP login and an SMTP send to vineetu@gmail.com; confirm SPF, DKIM and DMARC pass in Gmail's "Show original".
Phase 3 — Mail bridge
- A Python core using
imaplib/smtplib(orimapclient), wrapped as an MCP server with the tools above. - IMAP IDLE listener per mailbox, with reconnect and backoff.
- Audit log and kill switch from day one.
Phase 4 — Triage at L0 → L1
- Classifier plus summarizer; a daily digest to vineetu@gmail.com.
- Drafts-only replies after the first week.
- Track the draft edit rate: how many drafts are sent unchanged.
Phase 5 — L2 selective send
- Turn on auto-send for one category at a time, starting with acknowledgements.
- Review the audit log weekly.
7. Open decisions
- Where the bridge runs. An always-on host is needed for IMAP IDLE (e.g. the simple-host server, or any small VPS). A laptop only works while it's awake.
- Which agent runtime calls the tools (Claude Code, Claude Desktop, your own HoldLine-style agents, n8n).
- Tone and signature per mailbox: support@ as a product-support voice, hello@ as personal.
- Allowlist of the first auto-send categories for L2.
- Forwarding. Forwarding to Gmail stays on as a human backup; the agent works only from the Titan mailboxes so it doesn't double-handle messages.