Convert Figma logo to code with AI

ProtonMail logoproton-bridge

Proton Mail Bridge application

1,135
154
1,135
88

Top Related Projects

Tuta is an email service with a strong focus on security and privacy that lets you encrypt emails, contacts and calendar entries on all your devices.

A free & open modern, fast email client with user-friendly encryption and privacy features

A third-party, open-source ProtonMail CardDAV, IMAP and SMTP bridge

:love_letter: A beautiful, fast and fully open source mail client for Mac, Windows and Linux.

Quick Overview

Proton Bridge is an application that integrates ProtonMail encrypted email service with email clients that support IMAP and SMTP protocols. It acts as a local proxy between the email client and ProtonMail servers, handling encryption and decryption of emails on the user's device.

Pros

  • Enables the use of ProtonMail with traditional email clients (e.g., Thunderbird, Outlook)
  • Provides end-to-end encryption for emails, enhancing privacy and security
  • Supports both IMAP and SMTP protocols for seamless integration
  • Open-source, allowing for community contributions and audits

Cons

  • Requires installation and configuration on the user's device
  • May impact system performance due to local encryption/decryption processes
  • Limited to desktop platforms (Windows, macOS, Linux)
  • Potential for sync issues between the bridge and ProtonMail servers

Code Examples

As Proton Bridge is not a code library but a standalone application, there are no code examples to provide. The project is primarily focused on the application itself rather than providing a programmable interface.

Getting Started

Since Proton Bridge is an application rather than a code library, there's no code-based quick start. However, here are brief instructions for getting started:

  1. Download Proton Bridge from the official ProtonMail website
  2. Install the application on your computer
  3. Launch Proton Bridge and log in with your ProtonMail account
  4. Follow the setup wizard to configure your email client
  5. Use the generated IMAP/SMTP settings in your email client to connect to ProtonMail

For detailed instructions, refer to the official ProtonMail documentation.

Competitor Comparisons

Tuta is an email service with a strong focus on security and privacy that lets you encrypt emails, contacts and calendar entries on all your devices.

Pros of Tutanota

  • Fully open-source, including the client-side encryption
  • Built-in calendar with end-to-end encryption
  • Simpler setup process for users

Cons of Tutanota

  • Limited integration with third-party email clients
  • Smaller user base and community compared to ProtonMail
  • Fewer advanced features like custom domains

Code Comparison

Tutanota (TypeScript):

export function encryptBytes(key: Uint8Array, bytes: Uint8Array): Uint8Array {
    const nonce = random.generateRandomData(NONCE_BYTES)
    const encrypted = sodium.crypto_secretbox_easy(bytes, nonce, key)
    return concat(nonce, encrypted)
}

Proton Bridge (Go):

func (c *Crypto) Encrypt(plaintext []byte) ([]byte, error) {
    nonce := make([]byte, c.nonceSize)
    if _, err := rand.Read(nonce); err != nil {
        return nil, err
    }
    return c.gcm.Seal(nonce, nonce, plaintext, nil), nil
}

Both projects implement encryption functions, but Tutanota uses TypeScript and the sodium library, while Proton Bridge uses Go and the standard crypto package. Tutanota's approach is more focused on web technologies, while Proton Bridge is designed for desktop integration.

A free & open modern, fast email client with user-friendly encryption and privacy features

Pros of Mailpile

  • Open-source and self-hosted, providing full control over email data
  • Focuses on privacy and security with built-in encryption features
  • Offers a user-friendly web interface for managing emails

Cons of Mailpile

  • Requires more technical knowledge to set up and maintain
  • May have limited compatibility with some email providers
  • Development progress can be slower compared to commercial solutions

Code Comparison

Mailpile (Python):

def search(self, session, terms):
    idx = self._index()
    results = idx.search(session, terms)
    return results

Proton Bridge (Go):

func (b *Bridge) Search(query string) ([]*Message, error) {
    messages, err := b.store.SearchMessages(query)
    return messages, err
}

Both projects implement search functionality, but Mailpile uses Python and appears to have a more complex indexing system, while Proton Bridge uses Go and relies on a simpler store-based search. Mailpile's approach may offer more advanced search capabilities, while Proton Bridge's implementation could be more straightforward and potentially faster for basic searches.

A third-party, open-source ProtonMail CardDAV, IMAP and SMTP bridge

Pros of hydroxide

  • Lightweight and written in Go, potentially offering better performance
  • Open-source and community-driven, allowing for more transparency and contributions
  • Supports multiple Proton accounts simultaneously

Cons of hydroxide

  • Less official support and potentially fewer updates compared to proton-bridge
  • May lack some advanced features or integrations present in the official client
  • Potentially less stable or reliable due to its unofficial nature

Code comparison

proton-bridge (C++):

void Bridge::startBridge() {
    initializeComponents();
    setupConnections();
    runMainLoop();
}

hydroxide (Go):

func (b *Bridge) Start() error {
    b.initComponents()
    b.setupHandlers()
    return b.serve()
}

Both projects aim to provide IMAP/SMTP access to ProtonMail accounts, but they differ in implementation and official status. proton-bridge is the official solution developed by ProtonMail, offering robust support and regular updates. hydroxide is a community-driven alternative, providing a lightweight option with potential performance benefits. The choice between the two depends on user preferences for official support versus open-source flexibility.

:love_letter: A beautiful, fast and fully open source mail client for Mac, Windows and Linux.

Pros of Mailspring

  • Cross-platform support (Windows, macOS, Linux)
  • Rich set of features including unified inbox, snoozing, and advanced search
  • Modern and customizable user interface

Cons of Mailspring

  • Not fully open-source (some components are proprietary)
  • Requires a Mailspring ID for certain features
  • Less focus on privacy and encryption compared to Proton Bridge

Code Comparison

Mailspring (JavaScript):

export function parseContactFromEmail(email, name) {
  const contact = new Contact();
  contact.email = email;
  contact.name = name || email.split('@')[0];
  return contact;
}

Proton Bridge (Go):

func ParseAddress(address string) (*mail.Address, error) {
    addr, err := mail.ParseAddress(address)
    if err != nil {
        return nil, err
    }
    return addr, nil
}

The code snippets show different approaches to parsing email addresses. Mailspring uses JavaScript and focuses on creating a Contact object, while Proton Bridge uses Go and leverages the standard mail package for parsing.

Convert Figma logo designs to code with AI

Visual Copilot

Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.

Try Visual Copilot

README

Proton Mail Bridge and Import Export app

Copyright (c) 2024 Proton AG

This repository holds the Proton Mail Bridge and the Proton Mail 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

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, firstly 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.

Launchers

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

Official distributions of the Proton Mail 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 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:

WindowsMacLinuxLinux (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 DirPath
bridge lock filecachebridge.lock
bridge-gui lock filecachebridge-gui.lock
vaultconfigvault.enc
gRPC server jsonconfiggrpcServerConfig.json
gRPC client jsonconfiggrpcClientConfig_.json
gRPC Focus server jsonconfiggrpcFocusServerConfig.json
Logsdatalogs
gluon DBdatagluon/backend/db
gluon messagesdatagluon/backend/store
Update filesdataupdates
sentry cachedatasentry_cache
Mac/Linux File Sockettempbridge{4_DIGITS}