Skip to content

Instantly share code, notes, and snippets.

@NikolaRusakov
Last active August 21, 2024 09:15
Show Gist options
  • Select an option

  • Save NikolaRusakov/c28d893e78e353d858babb2c19fe01f7 to your computer and use it in GitHub Desktop.

Select an option

Save NikolaRusakov/c28d893e78e353d858babb2c19fe01f7 to your computer and use it in GitHub Desktop.
Email Oauth2 Proxy
python -m pip install emailproxy[gui]
pip install --no-cache-dir cryptography pyasyncore boto3 prompt_toolkit google-auth requests
emailproxy --no-gui --log-file ./emailproxy.log --config-file ./emailproxy.config --cache-store credstore.config --debug --local-server-auth

<!--  ??? do I need it caddy reverse-proxy --from :8080 --to :80 -->
[IMAP-1993]
server_address = outlook.office365.com
server_port = 993
local_address = 127.0.0.1
[SMTP-1587]
server_address = smtp-mail.outlook.com
server_port = 587
server_starttls = True
local_address = 127.0.0.1
[my@365outlook.office]
permission_url = https://login.microsoftonline.com/common/oauth2/v2.0/authorize
token_url = https://login.microsoftonline.com/common/oauth2/v2.0/token
oauth2_scope = https://outlook.office.com/IMAP.AccessAsUser.All https://outlook.office.com/POP.AccessAsUser.All https://outlook.office.com/SMTP.Send offline_access
redirect_uri = http://localhost:8080
client_id =
client_secret =
[emailproxy]
delete_account_token_on_password_error = True
encrypt_client_secret_on_first_use = False
allow_catch_all_accounts = False
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment