Bug 445229 - Wrong authentication setting for SMTP by default when adding a GMail account
Summary: Wrong authentication setting for SMTP by default when adding a GMail account
Status: RESOLVED FIXED
Alias: None
Product: kmail2
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-11-09 20:38 UTC by Andrés Vieira
Modified: 2022-06-11 19:04 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrés Vieira 2021-11-09 20:38:40 UTC
When adding a new GMail account an OAuth2 window pops up and everything works as expected. However the SMTP authentication settings have Authentication set to PLAIN, which does not work.

Setting this to XOAUTH2 solves the issue. So the bug seems that KMail seems to set PLAIN authentication by default even when an OAuth2 authentication method was used to add the account. 

How to manually fix the issue: Configure KMail -> Accounts -> Sending -> Select Google Mail SMTP -> Modify... -> Advanced -> Change "Authentication" from PLAIN to XOAUTH

STEPS TO REPRODUCE
1. Configure KMail -> Accounts -> Receiving -> Add... -> Add Mail account -> *follow wizard*
2. Try to send an email, which fires a warning email from google an does not work.

OBSERVED RESULT
Email does not send via SMTP because Google Mail does not let plain authentication to send emails by default.

EXPECTED RESULT
SMTP authenticates via OAuth2 by default if that what's been used to add the account, so sending mail works.


SOFTWARE/OS VERSIONS
Operating System: Arch Linux
KDE Plasma Version: 5.23.2
KDE Frameworks Version: 5.87.0
Qt Version: 5.15.2
Kernel Version: 5.14.16-zen1-1-zen (64-bit)
Graphics Platform: X11
Processors: 8 × 11th Gen Intel® Core™ i7-1165G7 @ 2.80GHz
Memory: 15,4 GiB of RAM
Graphics Processor: Mesa Intel® Xe Graphics
Comment 1 Kishore Gopalakrishnan 2022-04-10 11:01:40 UTC
I've made a merge request to fix this: https://invent.kde.org/pim/kmail-account-wizard/-/merge_requests/7 (earlier it was hardcoded to do oauth only for imap)
Comment 2 Bug Janitor Service 2022-05-17 11:56:29 UTC
A possibly relevant merge request was started @ https://invent.kde.org/pim/kmail-account-wizard/-/merge_requests/7
Comment 3 Kishore Gopalakrishnan 2022-06-11 19:04:35 UTC
Git commit 55fd9363563676ccdfe9ea62cc173b095841e33b by Kishore Gopalakrishnan.
Committed on 11/06/2022 at 16:02.
Pushed by mlaurent into branch 'master'.

Allow oauth2 for non-imap as well

At least for smtp, it is apparently supported.

M  +1    -1    src/ispdb/ispdb.cpp

https://invent.kde.org/pim/kmail-account-wizard/commit/55fd9363563676ccdfe9ea62cc173b095841e33b