Go to file
Jakub 1ed8e939b8 Other: typo 2021-09-20 14:28:57 +02:00
.github/ISSUE_TEMPLATE chore: add version info to github issue template 2020-11-19 16:57:21 +01:00
cmd GODT-980: placeholder for user agent 2021-02-17 13:49:51 +01:00
dist feat: include desktop files in repo 2021-02-05 10:38:25 +01:00
doc Other: typo 2021-09-20 14:28:57 +02:00
icon.iconset We build too many walls and not enough bridges 2020-04-08 12:59:16 +02:00
internal GODT-1205: "RCPT TO" does not contain all addressed from "CC" 2021-09-06 21:13:37 +00:00
pkg GODT-1205: "RCPT TO" does not contain all addressed from "CC" 2021-09-06 21:13:37 +00:00
release-notes Other 2021-09-01 07:45:48 +00:00
test GODT-219: Update to godog v0.12.1 2021-09-10 13:38:05 +02:00
utils GODT-1113: Fix tray icon size on macOS Big Sur. 2021-04-15 09:08:19 +00:00
.gitattributes use unreleased for changes 2020-11-20 14:35:24 +01:00
.gitignore chore: remove credits 2021-02-11 15:10:53 +00:00
.gitlab-ci.yml GODT-949: Fix section parsing issue 2021-06-02 05:56:17 +02:00
.gitmodules We build too many walls and not enough bridges 2020-04-08 12:59:16 +02:00
.golangci.yml Other: add straightforward linters 2021-04-08 16:09:40 +02:00
BUILDS.md docs: info about supported architecture in BUILDS.md 2021-01-25 10:46:39 +01:00
CONTRIBUTING.md We build too many walls and not enough bridges 2020-04-08 12:59:16 +02:00
COPYING_NOTES.md chore: bump go-imap dependency and remove go-imap-specialuse dependency 2021-01-11 12:25:06 +00:00
Changelog.md Other: Bridge James 1.8.9 2021-09-01 12:20:59 +02:00
LICENSE We build too many walls and not enough bridges 2020-04-08 12:59:16 +02:00
Makefile Other: Bridge James 1.8.9 2021-09-01 12:20:59 +02:00
README.md docs: correct readme locations for prefs.json 2021-01-21 14:12:24 +01:00
go.mod GODT-1318: Bump gopenpgp to 2.2.2, go-srp to a843a0b9, go-crypto to 52430bf6 2021-09-17 11:54:55 +02:00
go.sum GODT-1318: Bump gopenpgp to 2.2.2, go-srp to a843a0b9, go-crypto to 52430bf6 2021-09-17 11:54:55 +02:00

README.md

ProtonMail Bridge and Import Export app

Copyright (c) 2020 Proton Technologies AG

This repository holds the ProtonMail Bridge and the ProtonMail Import-Export applications. 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

ProtonMail Bridge for e-mail clients.

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

To configure an e-mail client, firstly log in using your ProtonMail 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 ProtonMail 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.

Description Import-Export app

ProtonMail Import-Export app for importing and exporting messages.

To transfer messages, firstly log in using your ProtonMail credentials. For import, expand your account, and pick the address to which to import messages from IMAP server or local EML or MBOX files. For export, pick the whole account or only a specific address. Then, in both cases, configure transfer rules (match source and target mailboxes, set time range limits and so on) and hit start. Once the transfer is complete, check the results.

More details on the public website.

Launchers

Launchers are binaries used to run the ProtonMail Bridge or Import-Export apps.

Official distributions of the ProtonMail Bridge and Import-Export apps contain 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 the ProtonMail Bridge. On Mac or Windows, Bridge uses native credential managers. On Linux, use Gnome keyring or pass.

Environment Variables

Bridge application

  • BRIDGESTRICTMODE: tells bridge to turn on bbolt's "strict mode" which checks the database after every Commit. Set to 1 to enable.

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_APP: set which app to test (bridge or ie)
  • TEST_ACCOUNTS: set JSON file with configured accounts
  • TAGS: set build tags for tests
  • FEATURES: set feature dir, file or scenario to test

Files

Database

The database stores metadata necessary for presenting messages and mailboxes to an email client:

  • Linux: ~/.cache/protonmail/bridge/<cacheVersion>/mailbox-<userID>.db (unless XDG_CACHE_HOME is set, in which case that is used as your ~)
  • macOS: ~/Library/Caches/protonmail/bridge/<cacheVersion>/mailbox-<userID>.db
  • Windows: %LOCALAPPDATA%\protonmail\bridge\<cacheVersion>\mailbox-<userID>.db

Preferences

User preferences are stored in json at the following location:

  • Linux: ~/.config/protonmail/bridge/prefs.json
  • macOS: ~/Library/ApplicationSupport/protonmail/bridge/prefs.json
  • Windows: %APPDATA%\protonmail\bridge\prefs.json

IMAP Cache

The currently subscribed mailboxes are held in a json file:

  • Linux: ~/.cache/protonmail/bridge/<cacheVersion>/user_info.json (unless XDG_CACHE_HOME is set, in which case that is used as your ~)
  • macOS: ~/Library/Caches/protonmail/bridge/<cacheVersion>/user_info.json
  • Windows: %LOCALAPPDATA%\protonmail\bridge\<cacheVersion>\user_info.json

Lock file

Bridge utilises an on-disk lock to ensure only one instance is run at once. The lock file is here:

  • Linux: ~/.cache/protonmail/bridge/<cacheVersion>/bridge.lock (unless XDG_CACHE_HOME is set, in which case that is used as your ~)
  • macOS: ~/Library/Caches/protonmail/bridge/<cacheVersion>/bridge.lock
  • Windows: %LOCALAPPDATA%\protonmail\bridge\<cacheVersion>\bridge.lock

TLS Certificate and Key

When bridge first starts, it generates a unique TLS certificate and key file at the following locations:

  • Linux: ~/.config/protonmail/bridge/{cert,key}.pem (unless XDG_CONFIG_HOME is set, in which case that is used as your ~/.config)
  • macOS: ~/Library/ApplicationSupport/protonmail/bridge/{cert,key}.pem
  • Windows: %APPDATA%\protonmail\bridge\{cert,key}.pem