From dc3e8c5b7d9c633efb4cd326e759d32f4ebbf9ca Mon Sep 17 00:00:00 2001 From: ralf Date: Mon, 23 Jan 2023 21:11:21 +0100 Subject: [PATCH] fix OAuth to also be triggered by name of imap-server, eg. for custom domains --- admin/inc/class.admin_mail.inc.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/admin/inc/class.admin_mail.inc.php b/admin/inc/class.admin_mail.inc.php index 657f3e52fd..72898fd93d 100644 --- a/admin/inc/class.admin_mail.inc.php +++ b/admin/inc/class.admin_mail.inc.php @@ -228,8 +228,8 @@ class admin_mail { $content['acc_imap_username'] = $content['ident_email']; } - // supported oauth providers - if (($oauth = OpenIDConnectClient::providerByDomain($content['acc_imap_username']))) + // supported oauth provider or mail-server of them for custom domains + if (($oauth = OpenIDConnectClient::providerByDomain($content['acc_imap_username'], $content['acc_imap_host']))) { $content['output'] .= lang('Using IMAP:%1, SMTP:%2, OAUTH:%3:', $oauth['imap'], $oauth['smtp'], $oauth['provider'])."\n"; $hosts[$oauth['imap']] = true; @@ -1811,4 +1811,4 @@ class admin_mail_logger { fwrite($this->fp, $msg."\n"); } -} \ No newline at end of file +}