Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for OAUTH2 #12

Open
swordfish22 opened this issue Nov 24, 2021 · 6 comments
Open

Support for OAUTH2 #12

swordfish22 opened this issue Nov 24, 2021 · 6 comments
Assignees
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@swordfish22
Copy link

Support for OAUTH2 would be desirable.

@libesmtp
Copy link
Owner

A search for OAUTH clients on GitHub finds a number of implementations in various languages, including a Python implementation from Google. I'm slightly surprised there are none in C++ however.

A viable approach should be an auth module that embeds the Python interpreter and provides an interface to libESMTP via Python's C API as this avoids issues like finding a suitable library to handle https, used as an out-of-band mechansim in OAUTH.

@libesmtp libesmtp self-assigned this Nov 24, 2021
@libesmtp libesmtp added enhancement New feature or request help wanted Extra attention is needed labels Nov 24, 2021
@swordfish22
Copy link
Author

There is a C Plugin for Postfix, with a bunch of Python scripts to handle updating of the tokens. It's not the best documented code ever.

http://mmogilvi.users.sourceforge.net/software/oauthbearer.html
https://github.com/moriyoshi/cyrus-sasl-xoauth2

@libesmtp
Copy link
Owner

RFC 5849 and RFC 6749 describe the OAUTH v1 and 2 protocols. RFC 7628 describes integration with SASL.

@rrthomas
Copy link

rrthomas commented Feb 3, 2022

One way to add OAUTH2 support (and in particular XOAUTH2, as used by Google) would be to replace the experimental GNU SASL support with Cyrus SASL, as there is a Cyrus SASL plugin for XOAUTH2.

@libesmtp
Copy link
Owner

libesmtp commented Feb 4, 2022 via email

@woodz-
Copy link

woodz- commented Oct 22, 2022

Is there any suggestion on how to enable mail bot operation? How could the credentials provided automatically on client-auth?

I am not quite sure how to deal with python stuff in a C-world as mentioned above.

I also don't understand, whether OAUTH is for providing credentials. A short lookup told me it is for auth delegation, meaning signing in into an application by another one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

4 participants