nextcloud / user_external

👥 External user authentication methods like IMAP, SMB and FTP
https://apps.nextcloud.com/apps/user_external
108 stars 64 forks source link

Do IMAP auth over direct socket connection #49

Closed violoncelloCH closed 5 years ago

violoncelloCH commented 5 years ago

fixes #44 fixes #13

Like proposed in #44 we took the implementation of roundcube but stripped away everything that's not needed for the authentication.

ref: https://github.com/roundcube/roundcubemail/blob/master/program/lib/Roundcube/rcube_imap_generic.php

as we're not using the php-imap (imap_open) library, this dependency isn't needed any more, however we need some different parameters to be set, so the configuration is different and needs to be changed on running instances (see https://github.com/nextcloud/user_external/blob/ec7929ab6aaaf97eb05b419c9d5b82544d629959/README.md vs. the current one)

thank you very much @ChristophWurst for your help!

cc @nextcloud/user_external @hcderaad @patschi @andryyy @lsbbs

philtrick-twm commented 5 years ago

Just a bit of information, I needed to use the following in the config.php: (I needed to explicitly use the mail server name, rather than 127.0.0.1, and I had to put single quotes around the ssl parameter, otherwise nextcloud had an error)

'user_backends' => array( array( 'class' => 'OC_User_IMAP', 'arguments' => array( 'mail.example.com', 993, 'ssl', 'example.com' ), ), ),

violoncelloCH commented 5 years ago

@philtrick-twm yes, thank you, see #52 and #53