MCPcopy Index your code
hub / github.com/emersion/hydroxide

github.com/emersion/hydroxide @v0.2.32

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.2.32 ↗ · + Follow
346 symbols 907 edges 31 files 16 documented · 5%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

hydroxide

A third-party, open-source ProtonMail bridge. For power users only, designed to run on a server.

hydroxide supports CardDAV, IMAP and SMTP.

Rationale:

  • No GUI, only a CLI (so it runs in headless environments)
  • Standard-compliant (we don't care about Microsoft Outlook)
  • Fully open-source

Feel free to join the IRC channel: #emersion on Libera Chat.

How does it work?

hydroxide is a server that translates standard protocols (SMTP, IMAP, CardDAV) into ProtonMail API requests. It allows you to use your preferred e-mail clients and git-send-email with ProtonMail.

+-----------------+             +-------------+  ProtonMail  +--------------+
|                 | IMAP, SMTP  |             |     API      |              |
|  E-mail client  <------------->  hydroxide  <-------------->  ProtonMail  |
|                 |             |             |              |              |
+-----------------+             +-------------+              +--------------+

Setup

Go

hydroxide is implemented in Go. Head to Go website for setup information.

Installing

Start by installing hydroxide:

git clone https://github.com/emersion/hydroxide.git
go build ./cmd/hydroxide

Then you'll need to login to ProtonMail via hydroxide, so that hydroxide can retrieve e-mails from ProtonMail. You can do so with this command:

hydroxide auth <username>

Once you're logged in, a "bridge password" will be printed. Don't close your terminal yet, as this password is not stored anywhere by hydroxide and will be needed when configuring your e-mail client.

Your ProtonMail credentials are stored on disk encrypted with this bridge password (a 32-byte random password generated when logging in).

Usage

hydroxide can be used in multiple modes.

Don't start hydroxide multiple times, instead you can use hydroxide serve. This requires ports 1025 (smtp), 1143 (imap), and 8080 (carddav).

SMTP

To run hydroxide as an SMTP server:

hydroxide smtp

Once the bridge is started, you can configure your e-mail client with the following settings:

  • Hostname: localhost
  • Port: 1025
  • Security: none
  • Username: your ProtonMail username
  • Password: the bridge password (not your ProtonMail password)

CardDAV

You must setup an HTTPS reverse proxy to forward requests to hydroxide.

hydroxide carddav

Tested on GNOME (Evolution) and Android (DAVDroid).

IMAP

⚠️ Warning: IMAP support is work-in-progress. Here be dragons.

For now, it only supports unencrypted local connections.

hydroxide imap

License

MIT

Extension points exported contracts — how you extend this code

Core symbols most depended-on inside this repo

Unlock
called by 34
protonmail/auth.go
doJSON
called by 33
protonmail/protonmail.go
Close
called by 31
imap/database/user.go
newRequest
called by 22
protonmail/protonmail.go
newJSONRequest
called by 13
protonmail/protonmail.go
Close
called by 10
protonmail/crypto.go
itoa
called by 9
protonmail/srp.go
Auth
called by 8
auth/auth.go

Shape

Method 166
Function 92
Struct 67
TypeAlias 20
Interface 1

Languages

Go100%

Modules by API surface

protonmail/messages.go40 symbols
protonmail/contacts.go26 symbols
imap/mailbox.go23 symbols
carddav/carddav.go22 symbols
protonmail/auth.go21 symbols
imap/message.go19 symbols
imap/user.go17 symbols
smtp/smtp.go16 symbols
protonmail/protonmail.go15 symbols
protonmail/crypto.go14 symbols
auth/auth.go14 symbols
imap/database/mailbox.go13 symbols

For agents

$ claude mcp add hydroxide \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact