roundcube / roundcubemail

The Roundcube Webmail suite
https://roundcube.net
GNU General Public License v3.0
5.79k stars 1.62k forks source link

Feature request -- oauth/managesieve #7925

Closed skug67 closed 3 years ago

skug67 commented 3 years ago

Having gotten oauth to work via Keycloak, I've now discovered that when logged in that way it is no longer possible to manage vacation rules and other filters with the managesieve plugin. Not a huge deal but would definitely be nice if that integration could survive into an oauth environment.

Costenslayer commented 3 years ago

@skug67 i cant seem to get things working my end what did you do to get this working ?

skug67 commented 3 years ago

oauth config that gets me logged in is here (https://github.com/roundcube/roundcubemail/issues/7812#issuecomment-792151001).

ibotty commented 3 years ago

After having patched Net_Sieve (hopefully released soon), I am struggeling to find the right way to use XOAUTH2 for managesieve in roundcube. When installing said library version it's possible to set $config['managesieve_auth_type'] = "XOAUTH2", but I can't find the right way to set it automatically (analogously to smtp and imap). There it's done in the callbacks storage_init and stmp_connect. Is there a similar place to hook into? I am unfortunately not familiar with roundcube code. I could, of course, patch plugins/managesieve/lib/Roundcube/rcube_sieve_engine.php directly, but that feels wrong.

alecpl commented 3 years ago

There's managesieve_connect hook with auth_type, user, password arguments. So, adding the required code to rcmail_oauth should be trivial. Use smtp_connect as a reference.

alecpl commented 3 years ago

Implemented. Requires Net_Sieve 1.4.5.