{"id":18832553,"url":"https://github.com/linka-cloud/o365-imap-proxy","last_synced_at":"2025-04-14T04:24:16.586Z","repository":{"id":114453961,"uuid":"549439612","full_name":"linka-cloud/o365-imap-proxy","owner":"linka-cloud","description":"Office 365 OAuth2 IMAP Proxy","archived":false,"fork":false,"pushed_at":"2024-08-01T14:49:55.000Z","size":51,"stargazers_count":5,"open_issues_count":0,"forks_count":3,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-27T18:21:22.772Z","etag":null,"topics":["azure-ad","azure-applications","imap","imap-proxy","legacy-support","oauth2"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/linka-cloud.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-10-11T07:32:11.000Z","updated_at":"2025-03-19T08:15:22.000Z","dependencies_parsed_at":null,"dependency_job_id":"ffa35cc4-7841-4f44-ab31-f4a57d689c33","html_url":"https://github.com/linka-cloud/o365-imap-proxy","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/linka-cloud%2Fo365-imap-proxy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/linka-cloud%2Fo365-imap-proxy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/linka-cloud%2Fo365-imap-proxy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/linka-cloud%2Fo365-imap-proxy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/linka-cloud","download_url":"https://codeload.github.com/linka-cloud/o365-imap-proxy/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248820147,"owners_count":21166610,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["azure-ad","azure-applications","imap","imap-proxy","legacy-support","oauth2"],"created_at":"2024-11-08T01:58:10.406Z","updated_at":"2025-04-14T04:24:16.554Z","avatar_url":"https://github.com/linka-cloud.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Office 365 OAuth2 IMAP Proxy\n\no365-imap-proxy is a proxy server that allows you to connect to the Office 365 IMAP server using PLAIN AUTH authentication.\n\nIt uses the OAuth2 Password flow with the PLAIN AUTH credentials to obtain an access token and then uses it to authenticate to the IMAP server with XAUTH2.\n\nThe main use case is to allow incompatible email clients and legacy applications to connect to the Office 365 IMAP server.\n\n## Prerequisites\n\nThe proxy needs an Azure AD application to be registered in order to obtain the OAuth2 credentials.\n\nThe application must be configured with \"**Resource Owner Password Credential Flow**\" enabled and have the following permissions:\n- `User.Read`\n- `IMAP.AccessAsUser.All`\n\n\nSee [Microsoft docs](https://docs.microsoft.com/en-us/exchange/client-developer/legacy-protocols/how-to-authenticate-an-imap-pop-smtp-application-by-using-oauth#use-client-credentials-grant-flow-to-authenticate-imap-and-pop-connections).\n\n## Installation\n\n### Docker\n\n```bash\ndocker pull linkacloud/o365-imap-proxy:latest\n```\n\n### From source\n\nTo build the binary from source, you need to have Go \u003e= 1.18 installed on your machine.\n\n```bash\ngit clone https://github.com/linka-cloud/o365-imap-proxy.git\ncd o365-imap-proxy\nmake build\n```\n\nThe binary will be available in the `bin` directory.\n\n## Usage\n\n```bash\n$ o365-imap-proxy --help \n\nOffice365 IMAP proxy allows to keep using IMAP clients without XOAUTH2 support with Office365 accounts by providing PLAIN AUTH support.\n\nUsage:\n  o365-imap-proxy [flags]\n\nFlags:\n      --address string         The address to listen on [$ADDRESS] defaults to :143 or :993 if TLS is enabled\n      --client-id string       The Azure App client id [$CLIENT_ID]\n      --client-secret string   The Azure App client secret [$CLIENT_SECRET]\n      --debug                  Enable debug logging\n  -h, --help                   help for o365-imap-proxy\n      --tenant string          The Azure AD tenant id [$TENANT]\n      --tls                    Enable TLS using generated self-signed certificate\n```\n\nThe proxy can be configured using environment variables:\n- `TENANT`: the Azure AD tenant ID\n- `CLIENT_ID`: the Azure AD application client ID\n- `CLIENT_SECRET`: the Azure AD application client secret\n\n### Docker\n\n```bash\ndocker run --name o365-imap-proxy \\\n  -e TENANT=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx \\\n  -e CLIENT_ID=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx \\\n  -e CLIENT_SECRET=xxxxxxxxxxxxxxxxxxxx \\\n  -p 143:143 \\\n  linkacloud/o365-imap-proxy:latest\n```\n\n### Docker Compose\n\nThe proxy can be deployed using docker-compose:\n\n```yaml\nversion: '3'\nservices:\n  o365-imap-proxy:\n    image: linkacloud/o365-imap-proxy:v0.0.1\n    container_name: o365-imap-proxy\n    restart: always\n    command:\n    - --tls\n    ports:\n      - \"993:993\"\n    environment:\n      TENANT: \"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx\"\n      CLIENT_ID: \"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx\"\n      CLIENT_SECRET: \"xxxxxxxxxxxxxxxxxxxx\"\n```\n\n```bash\ndocker-compose up -d\n```\n\n### From source\n\n```bash\nexport TENANT=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx\nexport CLIENT_ID=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx\nexport CLIENT_SECRET=xxxxxxxxxxxxxxxxxxxx\no365-imap-proxy --tls\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flinka-cloud%2Fo365-imap-proxy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flinka-cloud%2Fo365-imap-proxy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flinka-cloud%2Fo365-imap-proxy/lists"}