Files
2025-12-19 22:14:51 -07:00

6.1 KiB

title, date, tags, draft
title date tags draft
Proton Mail Bridge 2019-06-04T12:24:08-06:00
mail
mutt
protonmail
howton
guide
false

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 help

      Commands:
        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 check

      Check 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 change

      Change 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 clear

      Remove 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

  1. 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
    
  2. Add account: Add your ProtonMail accounts(s) by login command and type in your Username, Password, optionally Two factor code (if enabled) and Mailbox password (if enabled)

     >>> login
     Username: benjerry
     Password:
     Authenticating ...
     Adding account ...
     Account benjerry successfully added
     >>> list
     # : account              (status, address mode)
     0 : benjerry             (connected, combined)
    
  3. 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 info to access the Bridge credentials for your mailbox. The parameter of info command 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
    
  4. 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 mode followed by index or account name. In split addresses mode the info command 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
    
  5. Log out: You can use logout command 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 use login command to connect your account again. To completely remove your account from Bridge use delete command.

     >>> 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