Email Gateway with IMAP and SMTP Safety

The Hermes email gateway lets people email Rocky and receive an in-thread reply using standard IMAP and SMTP. It works with providers that expose those protocols and does not require a separate bot API.

Official documentation: https://hermes-agent.nousresearch.com/docs/user-guide/messaging/email

Separate gateway email from mailbox management

The gateway adapter is for receiving prompts by email and replying through the agent loop. It is different from the Himalaya skill, which lets an agent inspect, organize, and compose mailbox content through terminal commands. Choose the gateway when the inbox itself is the conversation channel.

Use a dedicated mailbox. Connecting a personal or shared inbox gives the gateway broad visibility and creates a risk of accidental replies to unrelated unread mail.

Setup checklist

  • Create a dedicated agent mailbox.
  • Enable IMAP and SMTP with the provider.
  • Create an app password or supported account-specific credential.
  • Run hermes gateway setup and select Email.
  • Configure the mailbox address, IMAP host, and SMTP host.
  • Add a narrow sender allowlist.
  • Decide whether inbound attachments should be skipped.
  • Set a reasonable polling interval.
  • Confirm only one Hermes gateway polls the mailbox.

Sender and attachment boundaries

Email is deny-by-default unless allowed senders or an intentionally configured access policy are present. Pairing is not automatically the best choice for a shared inbox because unrelated senders may already be waiting in the unread queue.

For a lower-risk intake channel, enable platforms.email.skip_attachments. The body remains available while file and inline parts are skipped before payload decoding. If attachments are required, restrict accepted workflows and treat every inbound file as untrusted.

Common pitfalls

  • Using the owner’s everyday inbox instead of a dedicated address.
  • Saving a normal account password when the provider requires an app password.
  • Setting allow-all and unintentionally replying to bulk mail or strangers.
  • Running two gateway instances and sending duplicate replies.
  • Lowering the poll interval aggressively and triggering provider limits.
  • Assuming every email client threads automated replies identically.
  • Confusing the gateway with a full mailbox-administration skill.

Verification steps

  1. Start the gateway and confirm IMAP and SMTP authentication succeed.
  2. Send a harmless message from an allowed address.
  3. Confirm the reply retains the intended subject and thread headers.
  4. Send from an unapproved address and verify no agent turn is created.
  5. Test attachment skipping or one approved sample file.
  6. Restart the gateway and confirm already-processed mail is not answered again.
  7. Check hermes gateway status for duplicate instances.
  8. Review sent mail and logs for loops, bounce handling, and secret redaction.

The safest email agent begins with a narrow inbox, narrow senders, and narrow attachment policy. Add broader mailbox capabilities only after the conversational path is stable and auditable.