MCPcopy Index your code
hub / github.com/ProtonMail/proton-bridge

github.com/ProtonMail/proton-bridge @v3.25.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release v3.25.0 ↗ · + Follow
6,467 symbols 23,173 edges 613 files 1,778 documented · 27% updated 36d agov3.25.0 · 2026-06-01★ 1,505
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Proton Mail Bridge

Copyright (c) 2026 Proton AG

This repository holds the Proton Mail Bridge application. For a detailed build information see BUILDS. The license can be found in LICENSE file, for more licensing information see COPYING_NOTES. For contribution policy see CONTRIBUTING.

Description Bridge

Proton Mail Bridge for e-mail clients.

When launched, Bridge will initialize local IMAP/SMTP servers and render its GUI.

To configure an e-mail client, first log in using your Proton Mail credentials. Open your e-mail client and add a new account using the settings which are located in the Bridge GUI. The client will only be able to sync with your Proton Mail account when the Bridge is running, thus the option to start Bridge on startup is enabled by default.

When the main window is closed, Bridge will continue to run in the background.

More details on the public website.

Launcher

The launcher is a binary used to run the Proton Mail Bridge.

The Official distribution of the Proton Mail Bridge application contains both a launcher and the app itself. The launcher is installed in a protected area of the system (i.e. an area accessible only with admin privileges) and is used to run the app. The launcher ensures that nobody tampered with the app's files by verifying their signature using a hardcoded public key. App files are placed in regular userspace and are signed by Proton's private key. This feature enables the app to securely update itself automatically without asking the user for a password.

Keychain

You need to have a keychain in order to run Proton Mail Bridge. On Mac or Windows, Bridge uses native credential managers. On Linux, use secret-service freedesktop.org API (e.g. Gnome keyring) or pass. We are working on allowing other secret services (e.g. KeepassXC), but for now only gnome-keyring is usable without major problems.

Environment Variables

Dev build or run

  • APP_VERSION: set the bridge app version used during testing or building
  • PROTONMAIL_ENV: when set to dev it is not using Sentry to report crashes
  • VERBOSITY: set log level used during test time and by the makefile

Integration testing

  • TEST_ENV: set which env to use (fake or live)
  • TEST_ACCOUNTS: set JSON file with configured accounts
  • TAGS: set build tags for tests
  • FEATURES: set feature dir, file or scenario to test

Folders

There are now three types of system folders which Bridge recognises:

Windows Mac Linux Linux (XDG)
config %APPDATA%\protonmail\bridge-v3 ~/Library/Application Support/protonmail/bridge-v3 ~/.config/protonmail/bridge-v3 $XDG_CONFIG_HOME/protonmail/bridge-v3
cache %LOCALAPPDATA%\protonmail\bridge-v3 ~/Library/Caches/protonmail/bridge-v3 ~/.cache/protonmail/bridge-v3 $XDG_CACHE_HOME/protonmail/bridge-v3
data %APPDATA%\protonmail\bridge-v3 ~/Library/Application Support/protonmail/bridge-v3 ~/.local/share/protonmail/bridge-v3 $XDG_DATA_HOME/protonmail/bridge-v3
temp %LOCALAPPDATA%\Temp $TMPDIR if non-empty, else /tmp $TMPDIR if non-empty, else /tmp $TMPDIR if non-empty, else /tmp

Files

Base Dir Path
bridge lock file cache bridge.lock
bridge-gui lock file cache bridge-gui.lock
vault config vault.enc
gRPC server json config grpcServerConfig.json
gRPC client json config grpcClientConfig_.json
gRPC Focus server json config grpcFocusServerConfig.json
Logs data logs
gluon DB data gluon/backend/db
gluon messages data gluon/backend/store
Update files data updates
sentry cache data sentry_cache
Mac/Linux File Socket temp bridge{4_DIGITS}

Extension points exported contracts — how you extend this code

Availability (Interface)
(no doc) [6 implementers]
internal/telemetry/types_heartbeat.go
Provider (Interface)
Provider provides standard locations. [4 implementers]
internal/locations/provider.go
CacheAccessor (Interface)
(no doc) [26 implementers]
internal/services/imapservice/shared_cache.go
EventPublisher (Interface)
(no doc) [5 implementers]
internal/events/events.go
Installer (Interface)
(no doc) [4 implementers]
internal/updater/updater.go
ProxyController (Interface)
(no doc) [3 implementers]
internal/bridge/types.go
TLSDialer (Interface)
(no doc) [3 implementers]
internal/dialer/dialer_basic.go
Identifier (Interface)
(no doc) [2 implementers]
internal/sentry/reporter.go

Core symbols most depended-on inside this repo

Equal
called by 930
internal/versioner/version.go
Error
called by 317
internal/services/smtp/errors.go
New
called by 235
internal/services/imapsmtpserver/imap.go
GetHostURL
called by 170
tests/api_test.go
log
called by 134
internal/frontend/bridge-gui/bridgepp/bridgepp/GRPC/GRPCClient.cpp
Close
called by 134
internal/services/imapservice/shared_labels.go
Unlock
called by 127
internal/safe/mutex.go
Lock
called by 115
internal/safe/mutex.go

Shape

Method 3,805
Function 1,848
Struct 589
Interface 103
Class 73
TypeAlias 38
FuncType 10
Enum 1

Languages

Go84%
C++13%
C#3%
Python1%

Modules by API surface

internal/frontend/grpc/bridge.pb.go814 symbols
internal/frontend/grpc/bridge_grpc.pb.go326 symbols
internal/services/syncservice/mocks_test.go128 symbols
internal/frontend/bridge-gui/bridgepp/bridgepp/GRPC/GRPCClient.cpp97 symbols
internal/frontend/bridge-gui/bridge-gui/QMLBackend.cpp89 symbols
tests/imap_test.go72 symbols
internal/frontend/grpc/event_factory.go65 symbols
internal/frontend/bridge-gui/bridge-gui-tester/GRPCService.cpp65 symbols
internal/frontend/bridge-gui/bridgepp/bridgepp/GRPC/EventFactory.cpp61 symbols
pkg/message/parser_test.go56 symbols
internal/frontend/grpc/service_methods.go53 symbols
tests/bridge_test.go48 symbols

For agents

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

⬇ download graph artifact