simonrob / email-oauth2-proxy

An IMAP/POP/SMTP proxy that transparently adds OAuth 2.0 authentication for email clients that don't support this method.
Apache License 2.0
843 stars 94 forks source link

Support for headless mode in docker containers or other limited input devices #203

Closed thucke closed 1 year ago

thucke commented 1 year ago

Hi @simonrob ,

I'm trying to get your proxy running in a docker container to support OAuth2 with Gmail. Obviously there seem to be a blocker because of this restriction: "Please note that on its own this mode is only of use if you have already authorised your accounts through the proxy in GUI mode".

In a docker container there is no GUI and trying to launch your script without --no-gui option results in Xlib.error.DisplayNameError: Bad display name "".

Would it be possible to

simonrob commented 1 year ago

Please read the rest of that readme section you quoted from – either the --external-auth or the --local-server-auth option will enable you to achieve what you want.

thucke commented 1 year ago

Thanks @simonrob and please apologize the inconvenience. I've read the section but by any case I did not recognize the inmportant information.