Gmail Accounts with Kmail

I had stepped away from using Kmail as my mail client on Linux for almost a year. I moved to Thunderbird for a few months, tweaking a lot of the usability issues with it to make it work better for me. I can say that I almost have it the way I want it but I thought I would have another go at getting Kmail and the whole Kontact suite to work with Gmail once again. I can confidently say that I have a solution that actually works. Maybe it was evident to every other Kmail user out there but it was no so for me.

Bottom Line Up Front: This is a bit fiddly and something does need to improve on Kmail to use the Google Authenticator like what is done with the calendar application, KOrganizer. For now, this works well enough to get the job done and I am happy enough with that because I can use my preferred Personal Information Management client, Kontact.

Gmail Blocks You

When you add Gmail Account using the Add Account menu item it settings, IMAP will automatically be selected, you can enter your password into the wizard but you do not have access to your account.

The Gmail resource will be broken with the Error:

Resource Google Mail is broken. Could not read the password: user rejected wallet access

This answer is actually misleading. The issue here is that the password authentication method has been deprecated but you can do an Application Specific authentication to remedy this.

Kmail Tweak

In the Google Mail IMAP settings, select the Advanced Tab and change Authentication to PLAIN.

Create and Use App Passwords

On the Google side of things, you will have to set an “App Password” which is a specific for application password that you set. This is not a standard password, but only for the specific application you specify.

Note: To create an app password, you need 2-Step Verification on your Google Account.

Go to your Google Account Settings
https://myaccount.google.com/

Select Security

Under “Signing in to Google,” select 2-Step Verification.

At the bottom of the page, select App passwords. It is the last option on the page.


Enter a name that helps you remember where you’ll use the app password.


Select Create

This will generate an App Password that you will use for Kmail or any “app” that doesn’t have the Google preferred authentication.

I copied this “App Password”, spaces and all, then pasted it into the Kmail IMAP Account Settings dialog.

Once you have successfully copied and pasted the 16-Character password, select Done.

Note: This is no option to view and copy the password once you select Done so be sure you have stored it or you will have to create a new App password. Also note, that app password you see displayed is not valid so don’t bother. 😉

Now your email should populate, all 2,000+ if it has been a while since you checked your Gmail.

Final Thoughts

I don’t really know if the username / password system is truly less secure than any other authentication method but I am at least happy to know that I am able to work around this issue with just a few steps.

I also want to note that Thunderbird is a fantastic email and calendar client. I think it works VERY well. I just happen to like how Kontact works better. It is more to do with the layout and the better integration into the Plasma Desktop environment. Mostly, the controls that I have at the top of the window boarder is basically the best ever.

Life is good, once again on my openSUSE Tumbleweed system.

References

https://bbs.archlinux.org/viewtopic.php?id=273728
https://support.google.com/accounts/answer/185833?hl=en&sjid=10625205665631656363-NC

6 thoughts on “Gmail Accounts with Kmail

    1. the answer from Google is:
      – “The setting you are looking for is not available for our account”

  1. See my comment above. Paste “https://myaccount.google.com/apppasswords” in your address line to get to the App password page

Leave a Reply