Proton Mail Bridge
Bridge CLI summary
The available commands with description are listed bellow. The content of CLI configuration instructions should be added to Static website. The tab completion and command history is available.
Command documentation
-
all commands
helpCommands: change Change server or account settings (aliases: ch, switch) check Check internet connection or new version. clear Remove stored accounts and preferences. (alias: cl) credits Print used resources. delete Remove the account from keychain. Use index or account name as parameter. (aliases: del, rm, remove) exit exit the program help display help info Print the configuration for account. Use index or account name as parameter. (alias: i) list Print the list of accounts. (aliases: l, ls) log-dir Print path to directory with logs. (aliases: log, logs) login Login procedure to add or connect account. Optionally use index or account as parameter. (aliases: a, add, con, connect) logout Disconnect the account. Use index or account name as parameter. (aliases: d, disconnect) manual Print URL with instructions. (alias: man) release-notes Print release notes. (aliases: notes, fixed-bugs, bugs, ver, version) restart Restart the IMAP/SMTP server. -
subcommands for
checkCheck internet connection or new version. Commands: internet Check internet connection. (aliases: i, conn, connection) updates Check for Bridge updates. (aliases: u, v, version) -
subcommands for
changeChange server or account settings (aliases: ch, switch) Commands: mode Switch between combined addresses and split addresses mode for account. Use index or account name as parameter. (alias: m) port Change port numbers of IMAP and SMTP servers. (alias: p) -
subcommands for
clearRemove stored accounts and preferences. (alias: cl) Commands: cache Remove stored preferences for accounts (aliases: c, prefs, preferences) keychain Remove all accounts from keychain. (aliases: k, accounts)
CLI configuration instructions
-
Command Line Interface: Start the Bridge command line interface from your terminal (to show all commands type
help)$ Desktop-Bridge --cli Welcome to ProtonMail Bridge interactive shell >>> list No active accounts. Please add account to continue -
Add account: Add your ProtonMail accounts(s) by
logincommand and type in yourUsername,Password, optionallyTwo factor code(if enabled) andMailbox password(if enabled)>>> login Username: benjerry Password: Authenticating ... Adding account ... Account benjerry successfully added >>> list # : account (status, address mode) 0 : benjerry (connected, combined) -
IMAP/SMTP Configuration: Now your account is successfully connected to the Bridge. By default, you will be in combined addresses mode, which means that emails from all of your addresses will be sent and received together in the same mailbox. You type
infoto access the Bridge credentials for your mailbox. The parameter ofinfocommand is index or account name and tab-completion is supported.>>> list # : account (status, address mode) 0 : benjerry (connected, combined) >>> info 0 Configuration for benjerry@protonmail.com IMAP Settings Address: 127.0.0.1 IMAP port: 1143 Username: benjerry@protonmail.com Password: Xd4uRbsHYYxTElUMSsaVLg SMTP Settings Address: 127.0.0.1 IMAP port: 1025 Username: benjerry@protonmail.com Password: Xd4uRbsHYYxTElUMSsaVLg -
Switching Address Mode: If you would like to switch to split addresses mode, in which each address is added to the client separately, use command
change modefollowed by index or account name. In split addresses mode theinfocommand prints the Bridge credentials for each of your addresses.>>> change mode 0 Are you sure you want to change the mode for account benjerry to split mode? yes/No: yes Address mode for account benjerry changed to split mode >>> list # : account (status, address mode) 0 : benjerry (connected, split) >>> i 0 Configuration for benjerry@protonmail.com IMAP Settings Address: 127.0.0.1 IMAP port: 1143 Username: benjerry@protonmail.com Password: Xd4uRbsHYYxTElUMSsaVLg SMTP Settings Address: 127.0.0.1 IMAP port: 1025 Username: benjerry@protonmail.com Password: Xd4uRbsHYYxTElUMSsaVLg Configuration for eyescream@protonmail.com IMAP Settings Address: 127.0.0.1 IMAP port: 1143 Username: eyescream@protonmail.com Password: Xd4uRbsHYYxTElUMSsaVLg SMTP Settings Address: 127.0.0.1 IMAP port: 1025 Username: eyescream@protonmail.com Password: Xd4uRbsHYYxTElUMSsaVLg -
Log out: You can use
logoutcommand followed by index or name of account to disable sending / receiving of new emails. Your existing emails will still be stored in your client. If you are logged out, which can also happen if you change your password, you can uselogincommand to connect your account again. To completely remove your account from Bridge usedeletecommand.>>> logout benjerry Are you sure you want to logout account benjerry? yes/No: y >>> delete benjerry Are you sure you want to remove account benjerry? yes/No: y Do you want to remove cache for this account? yes/No: y