A docker version of the Proton mail bridge command line interface. It creates a local SMTP server, so other docker containers can send emails via your proton mail account.
  • Shell 81.5%
  • Dockerfile 18.5%
Find a file
Paul Git bac5353a44
Add grype image scan script and Docker tweaks
Add scripts/scan-image.sh to run Grype scans with JSON/SARIF output.
Update Dockerfile: pin google.golang.org/grpc, run apt-get upgrade, and
remove net-tools from runtime deps. Fix README example filename to
docker-compose.yaml.
2026-04-20 19:38:07 +08:00
scripts Add grype image scan script and Docker tweaks 2026-04-20 19:38:07 +08:00
.gitignore Add environment variables to indicate ports really used by Proton mail bridge. Some k3s instances seems to need it. 2024-03-11 11:42:15 +01:00
docker-build.sh Use Trixie base images and improve build script 2026-04-12 17:15:02 +08:00
docker-compose.yaml Replace compose.yaml with docker-compose.yaml 2026-04-20 07:40:59 +08:00
Dockerfile Add grype image scan script and Docker tweaks 2026-04-20 19:38:07 +08:00
entrypoint.sh Updated copyright message 2026-02-22 18:22:49 +08:00
GPGparams.txt Initial commit 2024-03-04 09:34:02 +01:00
LICENSE.txt Added GPL license file. 2024-03-13 15:47:07 +01:00
logo.png Added logo by Korben. 2024-03-19 15:13:39 +01:00
README.md Add grype image scan script and Docker tweaks 2026-04-20 19:38:07 +08:00
VERSION Use Trixie base images and improve build script 2026-04-12 17:15:02 +08:00

Proton Mail Bridge docker

A docker version of the Proton mail Bridge command line interface. It creates a local SMTP server, so other docker containers can send emails via your Proton email account.

!WARNING! As of the time of this writing, you need a paid plan (Mail Plus, Proton Unlimited or Proton for Business) to be able to log in. It won't work for free account.

Logo Proton Mail Bridge docker (Merci Korben pour le logo)

Install

Download the latest docker image from:

docker pull code.paulg.it/paulgit/proton-mail-bridge:latest

Launch it with the following command to expose TCP ports 12025 for SMTP and 12143 for IMAP on your local network interface. You MUST provide a path volume storage (mkdir /path/to/your/volume/storage).

docker run -d --name=protonmail_bridge -v /path/to/your/volume/storage:/root -p 127.0.0.1:12025:25/tcp -p 127.0.0.1:12143:143/tcp --network network20 --restart=unless-stopped paulgit/proton-mail-bridge:latest

OR (docker compose version):

wget https://code.paulg.it/paulgit/protonmail-bridge-docker/raw/branch/master/docker-compose.yaml
docker-compose up -d

Setup

Now, you need to open a bash terminal on the current running container and use the Proton Bridge interactive command line:

docker exec -it protonmail_bridge /bin/bash
# First we need to kill the default bridge startup instance (only one instance of bridge can run at the same time)
root@8972584f86d4:/app# pkill bridge
# Login to your Proton account:
root@8972584f86d4:/app# /usr/bin/bridge --cli
....
      Welcome to Proton Mail Bridge interactive shell
....
>>> info
No active accounts. Please add account to continue.

# Type help for a list of all commands:
>>> help
# Login to a Proton account (!MUST! be a paid plan to use this client), follow the instructions on screen:
# Tip: Use Ctrl+Shift+V to paste on most Linux terminal.
>>> login
Username: test_account@proton.me
Password: 
Authenticating ...
Two factor code: 123456
Account test_account was added successfully.
>>> A sync has begun for test_account.
Sync (test_account): 1.0% (Elapsed: 0.5s, ETA: 46.0s)
...
Sync (test_account): 99.9% (Elapsed: 50.4s, ETA: 0.4s)
A sync has finished for test_account.
>>>
# Success !

IF you are using multiple domain names or email addresses, you SHOULD switch to split address mode (it will set credentials for each address in the account).

It will sync the account again, time to grab a coffee.

>>> change mode 0
Are you sure you want to change the mode for account test_account to split? yes/no: yes
Address mode for account test_account changed to split
>>> A sync has begun for test_account.
Sync (test_account): 1.0% (Elapsed: 0.3s, ETA: 32.6s)
...
Sync (test_account): 99.9% (Elapsed: 50.4s, ETA: 0.4s)
A sync has finished for test_account.
>>>

Use the following information to connect via an SMTP client. The port numbers for the SMTP/IMAP connections are 12025 and 12143 (see command docker ps), NOT the one provided by the infocommand.

You MUST copy the username AND password from the info command (the password is random and different from your Proton account):

>>> info
Configuration for test_account@proton.me
IMAP Settings
Address:   127.0.0.1
IMAP port: 1143
Username:  test_account@proton.me
Password:  abcedfGHI12345
Security:  STARTTLS

SMTP Settings
Address:   127.0.0.1
SMTP port: 1025
Username:  test_account@proton.me
Password:  abcedfGHI12345
Security:  STARTTLS

Configuration for another_account@proton.me
....

# Exit
>>> exit
root@8972584f86d4:/app# exit

See a list of all Proton bridge commands available here or use the help command.

We have killed the default bridge instance by exiting it during the previous step, so we MUST restart the container:

docker container restart protonmail_bridge

OR (docker compose version):

docker-compose restart

(Optional) You can check the bridge command line output with:

docker container logs protonmail_bridge

It should end with A sync has finished for <name_of_your_account>

Notes

  1. Your email client might complain about the self-signed certificate used by Proton mail bridge server.
  2. If you want other docker containers to only be able to send emails, you should only expose SMTP port 25.

License

Copyright (c) 2026 David BASTIEN, Paul Rudkin

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/.

Sources:

Made from Debian 12 (bookworm) Go image and latest Proton Mail Bridge sources