user_external icon indicating copy to clipboard operation
user_external copied to clipboard

SMTP Authentication User-Backend

Open rakshith-ravi opened this issue 7 years ago • 1 comments

Affected apps

External user-backend

Reason behind the feature request

The IMAP servers out there are segmented. Some providers don't allow for IMAP unless upgraded to a paid plan (Eg: Zoho) and expect the users to purely use the web interface. Moreover, some users disable IMAP entirely and use POP3 alone.

In situations like these, the IMAP authentication simply fails. The user has no choice but to go with a local user for the authentication.

It would be better if we go with SMTP for authentication or, ideally, add an SMTP authentication backend, in order to avoid breaking existing installations, for the sake of Email based authentication. Every provider provides SMTP and it's a more common way of authenticating users (regardless of IMAP or POP3).

Honestly, I'd love to implement this and make a pull request, but unfortunately, I'm not sure what to read up on in order to do SMTP auth. Every article I read online seems to teach me "how to send emails with SMTP in PHP", which is not what we're trying to do here. So if someone could point me in the right direction, I'd be happy to make a PR

rakshith-ravi avatar Sep 25 '18 08:09 rakshith-ravi

PR is welcome!

Honestly, I'd love to implement this and make a pull request, but unfortunately, I'm not sure what to read up on in order to do SMTP auth. Every article I read online seems to teach me "how to send emails with SMTP in PHP", which is not what we're trying to do here. So if someone could point me in the right direction, I'd be happy to make a PR

That seems to be because you can send mails with PHP over SMTP, and that's the primary thing people do. SMTP can be used to send EMails without a verification, we would specifically need the authenticate part, but not to send mails. Nextcloud uses Swiftmailer to send Mails in https://github.com/nextcloud/server/blob/master/lib/private/Mail/Mailer.php, so you could probably use Swiftmailer too to implement this.

violoncelloCH avatar Dec 21 '18 19:12 violoncelloCH