Author Topic: Fixed smtp user/pw is not used when authenticated with OAUTH  (Read 5113 times)

Offline netchild

  • Newbie
  • *
  • Posts: 4
Fixed smtp user/pw is not used when authenticated with OAUTH
« on: October 17, 2023, 09:01:44 AM »
Hi,

I have
$config['smtp_user'] = 'generic_user';
$config['smtp_pass'] = 'a long pw';

When authenticated via username/password to roundcube, those settings are used via the normal AUTH mechs of the smtp server (in my case PLAIN or LOGIN after STARTTLS). When I login via OAUTH to roundcube, this is not the case. roundcube only tries XOAUTH2, which my smtp server doesn't offer in the AUTH header (and can't offer in the current setup).

I have not checked what roundcube tries to use as user/pw in the XOAUTH2 case.

Personally I would prefer roundcube has a look at the AUTH header of the smtp server, and if the server offers XOAUTH2 and it has a oauth2 token, it shall give it a try, but fall back to smtp_user/smtp_pass (if available) with other valid AUTH mechs of the smtp server otherwise.

Bye,
Alexander.