Proton Py Bridge is a third-party, open-source ProtonMail bridge implemented in Python. It is designed for power users and intended to run on a server. The project supports CardDAV, IMAP, and SMTP, providing compatibility with standard protocols.
This code relies on the Proton Python Client. Please note that, as of now, the latest version of the Proton Python Client is not available on PyPI (Python Package Index). To ensure optimal functionality, it is recommended to clone their repository into the project folder.
For more details on the Proton Python Client, like updates and others, refer to the Proton Python Client repository.
This project draws inspiration from Hydroxide, an analogous open-source ProtonMail bridge implemented in Golang by the talented developers at emersion. We acknowledge their innovative work and aim to provide a Python implementation to extend the accessibility and contribution possibilities to the Python community.
For more details on the original Hydroxide project, visit Hydroxide on GitHub.
- Command-Line Interface (CLI): No graphical user interface (GUI) is provided to ensure compatibility with headless environments.
- Standard-Compliant: The project adheres to industry standards, prioritizing compatibility with standard protocols while not catering to specific platforms like Microsoft Outlook.
- Fully Open-Source: The entire codebase is available for review and contribution.
Feel free to join our community on IRC: #protonpybridge on Libera Chat.
Proton Py Bridge acts as a server, translating standard protocols (SMTP, IMAP, CardDAV) into ProtonMail API requests. This allows users to leverage their preferred email clients and tools like git-send-email
with ProtonMail.
sequenceDiagram
participant c as E-Mail Client
participant h as Proton Py Bridge
participant p as Proton Mail
c->>h: IMAP, SMTP
h->>p: ProtonMail API
Proton Py Bridge is implemented in Python. Ensure you have a compatible Python environment installed.
Clone the repository and install the project:
git clone --recursive https://github.com/sastatic/protonpybridge.git
cd protonpybridge
pip install -r requirements.txt
Next, configure the necessary settings and credentials:
python setup.py configure
Proton Py Bridge supports multiple modes of operation. It is recommended to use the provided protonpybridge serve
command to avoid starting the bridge multiple times.
To run Proton Py Bridge as an SMTP server:
protonpybridge smtp
Configure your email client with the following settings:
- Hostname:
localhost
- Port: 1025
- Security: none
- Username: your ProtonMail username
- Password: the bridge password (not your ProtonMail password)
Set up an HTTPS reverse proxy to forward requests to Proton Py Bridge:
protonpybridge carddav
Tested on GNOME (Evolution) and Android (DAVDroid).
For now, it only supports unencrypted local connections:
protonpybridge imap
We welcome contributions from the community. Before contributing, please read our Contribution Guidelines.
This project is licensed under the GNU General Public License Version 3 - see the LICENSE file for details.