email-oauth2-proxy | SMTP proxy that transparently adds OAuth

 by   simonrob Python Version: 2023-05-18 License: Apache-2.0

kandi X-RAY | email-oauth2-proxy Summary

kandi X-RAY | email-oauth2-proxy Summary

email-oauth2-proxy is a Python library. email-oauth2-proxy has no bugs, it has no vulnerabilities, it has build file available, it has a Permissive License and it has low support. You can install using 'pip install email-oauth2-proxy' or download it from GitHub, PyPI.

An IMAP/SMTP proxy that transparently adds OAuth 2.0 authentication for clients that don't support this method.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              email-oauth2-proxy has a low active ecosystem.
              It has 329 star(s) with 60 fork(s). There are 13 watchers for this library.
              OutlinedDot
              It had no major release in the last 12 months.
              There are 3 open issues and 137 have been closed. On average issues are closed in 17 days. There are no pull requests.
              It has a neutral sentiment in the developer community.
              The latest version of email-oauth2-proxy is 2023-05-18

            kandi-Quality Quality

              email-oauth2-proxy has no bugs reported.

            kandi-Security Security

              email-oauth2-proxy has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.

            kandi-License License

              email-oauth2-proxy is licensed under the Apache-2.0 License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              email-oauth2-proxy releases are available to install and integrate.
              Deployable package is available in PyPI.
              Build file is available. You can build the component from source.
              Installation instructions are available. Examples and code snippets are not available.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of email-oauth2-proxy
            Get all kandi verified functions for this library.

            email-oauth2-proxy Key Features

            No Key Features are available at this moment for email-oauth2-proxy.

            email-oauth2-proxy Examples and Code Snippets

            No Code Snippets are available at this moment for email-oauth2-proxy.

            Community Discussions

            No Community Discussions are available at this moment for email-oauth2-proxy.Refer to stack overflow page for discussions.

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install email-oauth2-proxy

            After downloading the contents of this repository, start by editing the file emailproxy.config to add configuration details for each server and account you want to use with the proxy. Documentation and example account configurations are provided for Office 365 and Gmail, but you will need to register a new Microsoft identity or Google API desktop app client (or use your existing desktop app's client ID and secret). Make sure your client is set up to use an OAuth scope that will give it permission to access IMAP/SMTP – see the sample configuration file for examples. You can remove details from the sample configuration file for services you don't use, or add additional ones for any other OAuth 2.0 IMAP/SMTP servers you would like to use with the proxy (note: services other than Office 365 and Gmail have not been tested, but should work – please open an issue if not). Multiple accounts with the same provider can share the same server, and the correct server to use with an account is identified using the port number you configure in your client, as explained below. Account names (i.e., email addresses) must be unique – only one entry per account is permitted in the configuration file. Once the proxy is running, you can view or update the current configuration from its menu (via the Servers and accounts option). Next, from a terminal, install the script's requirements: python3 -m pip install -r requirements.txt, and start the proxy: python3 emailproxy.py – a menu bar/taskbar icon should appear. If instead of the icon you see an error in the terminal, it is likely that your system is missing dependencies for the pywebview or pystray packages. See the Dependencies and setup section below to resolve this. Once any missing dependencies have been installed, starting the proxy should create a menu bar icon. Finally, open your email client and configure your account's server details to match the ones you set in the proxy's configuration file. For example, using the sample Office 365 details, this would be localhost on port 1993 for IMAP and localhost on port 1587 for SMTP. The local connection in your email client should be configured as unencrypted to allow the proxy to operate, but the connection between the proxy and your email server is secured (implicit SSL/TLS for IMAP; implicit or explicit (STARTTLS) SSL/TLS for SMTP). The first time your email client makes a request you should see a notification from the proxy about authorising your account. (Note that the notification is not itself clickable, but pull requests to improve this are very welcome). Click the proxy's menu bar icon, select your account name in the Authorise account submenu, and then log in via the popup browser window that appears. The window will close itself once the process is complete. After successful authentication and authorisation you should have IMAP/SMTP access to your account as normal. Make sure you keep the proxy running at all times to allow it to authorise your email client's background activity – see the next section for instructions about how to do this. No further proxy interaction should be required unless your account needs authorising again, but it will notify you if this is the case.
            On macOS the setup and installation instructions above should automatically install all required dependencies. Any error messages you may encounter (for example, with your pip version and cryptograpy, or pillow and imagingft dependencies) normally point to clear explanations of how to resolve these issues. Please open an issue if you encounter any other problems here. When first launching on Linux you may encounter errors similar to Namespace […] not available. This is caused by missing dependencies for pystray and pywebview, which are used to display the menu bar icon and login windows. See the pywebview dependencies page and issue 1 in this repository for a summary and suggestions about how to resolve this. A similar issue may occur on Windows with the pythonnet package, which is required for pywebview. If you are unable to resolve this by following the pythonnet installation instructions, you may find that installing a prebuilt wheel helps fix the issue.

            Support

            If you encounter problems using the proxy, enabling Debug mode from the menu or passing --debug as a script argument will print all client–proxy–server communication to your system log to help identify the issue. This will include all commands to and responses from the server (and also as a result the content of your email messages). On macOS this can be viewed using Console.app (select system.log in the sidebar). On Windows a file emailproxy.log will be created in the same location as the proxy script. On Linux you can use, for example, tail -f /var/log/syslog | grep "Email OAuth 2.0 Proxy". Please note that debug mode may also result in your login credentials being printed to the log (though this is avoided where possible). However, it is worth pointing out that because account authorisation is handled entirely through OAuth 2.0 in a web browser, while the username you set in your email client must be correct, the password used for the IMAP/SMTP connection can be anything you like, and does not need to be the one you actually use to log in to your account. The password you provide via your email client is used only to encrypt and decrypt the authentication token that the proxy transparently sends to the server on your behalf. Because of this, if you are concerned about debug mode and security you can use a test password for debugging and then replace it with a secure password (and authenticate again) once set up. It is often helpful to be able to view the raw connection details when debugging (i.e., without using your email client). This can be achieved using telnet on macOS/Linux, or Putty on Windows. For example, to test the Office 365 IMAP server from the example configuration, first open a connection using telnet localhost 1993, and then send a login command: a1 login e@mail.com password, replacing e@mail.com with your email address, and password with any value you like during testing (see above for why the password is irrelevant). If you have already authorised your account with the proxy you should see a response starting with a1 OK LOGIN; if not, this command should trigger a notification from the proxy about authorising your account.
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/simonrob/email-oauth2-proxy.git

          • CLI

            gh repo clone simonrob/email-oauth2-proxy

          • sshUrl

            git@github.com:simonrob/email-oauth2-proxy.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link