An AI agent process can be prompt-injected. It must not hold the Proton Bridge password or see IMAP/SMTP secrets.
Proton Mail Bridge is the only hop that talks to Proton. This package talks to Bridge on loopback only.
- Agent authenticates with a random bearer token only.
- Bridge credentials live in Himalaya config (mode 0600), never in agent context.
- Listener is loopback unless the operator opts into LAN.
- List endpoints do not include message bodies.
- Logs are redacted for tokens and passwords.
- Himalaya < 1.2 is a hard fail.
- Serve refuses if Bridge IMAP/SMTP is bound off loopback.
- Serve refuses a world-readable Himalaya config or token file.
- Serve refuses if Himalaya
backend.host/ SMTP host is not loopback. - The IMAP child does not inherit
PROTON_AGENT_TOKEN. - Folder names and message ids are allowlisted (no shell injection).
agent --token--> 127.0.0.1:18765 --> Himalaya --> 127.0.0.1:1143/1025 --> Bridge --> Proton
- Set Bridge IMAP/SMTP host to
127.0.0.1(not0.0.0.0). - Loopback
encryption.type = "none"is Proton’s documented local pattern. TLS to Proton is inside Bridge. Do not point Himalaya at a remote host. - This tool never prints
auth.raw.
proton-agent-mail token— do not commit it.chmod 600Himalaya config and token file.- Do not expose 18765, 1143, or 1025 on a public interface.
- Rotate the token if the agent session is compromised.
- Keep Proton Bridge updated.
No operator hosts, no house paths, no live tokens. The audit script uses generic secret/mesh patterns only — never real home directories or hostnames (those strings would be the leak). Run:
bash scripts/security_audit.shOpen a private security advisory. Do not file public issues with credentials.