Open-sourced: agent-outbound-mail-gateway: HMAC-signed outbound mail for AI agents

What it is

Globe Teck’s agent-outbound-mail-gateway lets an AI agent or script send email as a business address without a browser session or an SMTP password. It is one small PHP endpoint on your existing web host that accepts HMAC-signed requests.

Why we built it

We run AI agents with Grok Bot and Cursor at Globe Teck, and wanted agents to send mail only from approved senders without broad mailbox access.

Highlights

  • HMAC-SHA256 signed requests with a clock window and a required idempotency key
  • Recipient allowlist plus per-hour and per-day rate limits
  • CR/LF header-injection rejection and a fixed From address set in server config
  • Python client that dry-runs by default and only sends with --confirm

Links

Feedback, issues and PRs welcome.