Bug 977720

Summary: Evolution stores in keyring one password per account making impossible to use different settings for imap/smtp
Product: [Fedora] Fedora Reporter: markm <marek78uk>
Component: evolutionAssignee: Matthew Barnes <mbarnes>
Status: CLOSED UPSTREAM QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: urgent Docs Contact:
Priority: unspecified    
Version: 19CC: bmason, h0wdyd3wdy, lucilanga, marek78uk, mbarnes, mcrha
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-07-23 05:32:00 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Receving emails setting
none
Sending emails settings
none
Evolution asks for password after en email was sent
none
sources attached none

Description markm 2013-06-25 08:24:54 UTC
Description of problem:

Installed Fedora 19 Beta with MATE desktop, added evolution.
Whenever I boot up my computer and start evolution, it asks about password for an account, it offers to add this password to the keyring, but that does not seem to work. Same with smtp password.

Version-Release number of selected component (if applicable):

$ rpm -qa | grep keyring
mate-keyring-pam-1.6.0-2.fc19.x86_64
libmatekeyring-1.6.0-1.fc19.x86_64
gnome-keyring-sharp-1.0.1-0.12.133722svn.fc19.x86_64
mate-keyring-1.6.0-2.fc19.x86_64
libgnome-keyring-3.8.0-1.fc19.x86_64
gnome-keyring-3.8.2-1.fc19.x86_64
gnome-keyring-pam-3.8.2-1.fc19.x86_64

$ rpm -qa | grep keyring
mate-keyring-pam-1.6.0-2.fc19.x86_64
libmatekeyring-1.6.0-1.fc19.x86_64
gnome-keyring-sharp-1.0.1-0.12.133722svn.fc19.x86_64
mate-keyring-1.6.0-2.fc19.x86_64
libgnome-keyring-3.8.0-1.fc19.x86_64
gnome-keyring-3.8.2-1.fc19.x86_64
gnome-keyring-pam-3.8.2-1.fc19.x86_64

How reproducible:

always

Steps to Reproduce:
1. Start a new MATE desktop session
2. Run Evolution
3. Access mail or calendar
4. Provide password to the account
5. Send an email or something, provide password
6. Close Eclipse
7. Reboot
8. Start a new MATE desktop session
9. Run Evolution

Actual results:

Evolution asks about password giving an option to remember the password in keyring. 

Expected results:

Evolution to remember password from previous session...

Additional info:

I use gmail with 2-step verification through imap, so it's bit painful to get a password sorted every time I need to use my email.

The 'password' modal window is annoying as it does not allow me to do anything else but enter the password or close the modal window - it should block only the application, not entire desktop.

Comment 1 Milan Crha 2013-06-26 13:31:52 UTC
Thanks for a bug report. I currently have running a MATE machine, and the passwords are saved properly here. When I invoke:
   $ ps ax | grep keyr
I get:
 2062 ?        Sl     0:00 /usr/bin/gnome-keyring-daemon --daemonize --login
 2066 ?        Sl     0:00 /usr/bin/mate-keyring-daemon --daemonize --login
I didn't run gnome-keyring-daemon on my own, it was run somehow automatically.

I have the same packages as you:
gnome-keyring-3.8.2-1.fc19.x86_64
gnome-keyring-pam-3.8.2-1.fc19.x86_64
gnome-python2-gnomekeyring-2.32.0-14.fc19.x86_64
libgnome-keyring-3.8.0-1.fc19.x86_64
libgnome-keyring-debuginfo-3.8.0-1.fc19.x86_64
libgnome-keyring-devel-3.8.0-1.fc19.x86_64
libmatekeyring-1.6.0-1.fc19.x86_64
mate-keyring-1.6.0-2.fc19.x86_64
mate-keyring-pam-1.6.0-2.fc19.x86_64

The process responsible for password storing is
   /usr/libexec/evolution-source-registry
you can try to run it from a console and check its output, maybe it prints there what failed when it tried to save your password.

I would also check with seahorse that your keyring is unlocked, just in case.

Comment 2 markm 2013-06-26 19:07:10 UTC
I've posted this bug yesterday, when I was working from home and had to enter my password a number of times. Today I've powered my computer and all seems to work ok, didn't get any password prompt.

$ ps ax | grep keyr
 1385 ?        Sl     0:00 /usr/bin/gnome-keyring-daemon --daemonize --login
 1389 ?        Sl     0:00 /usr/bin/mate-keyring-daemon --daemonize --login

gnome-keyring and mate-keyring are running ok, so I'll close it for now, but if issue re-appears, I'll open it.

Many thanks for a quick reply!

Comment 3 markm 2013-06-30 19:40:11 UTC
Found the root cause of the problem:

It seems there's only one password stored against the account.

I have an account "Personal", which fetches mail from imap.google.com using username1 and password1, but for smtp I use my perosnal mail server with username2 and password2. What happens is:

1) Open Evolution
2) Loads mail via imap
3) Send email (via smtp on different server with different username/password)
4) It will ask for a password for account "Personal", so I enter password...
5) Close Evolution
6) re-login
7) Open Evolution
8) It will ask for a password for account "Personal"...

It seems to overwrite password on either account if one is entered, but it does not change the username.

Comment 4 Milan Crha 2013-07-01 09:27:52 UTC
How did you configure the account, please? As you mention GMail, is it configured through GNOME Online Accounts? I tried to mimic your situation, thus I created a new account in evolution, set its receiving part to GMail, and its sending part to another server with another password and user name, and I'm not repeatedly asked for my password, I was asked only once for my IMAP password, and once for my SMTP password, then the next start I can connect to both services.

Comment 5 markm 2013-07-02 10:33:42 UTC
I've installed Fedora with MATE-Desktop (selected on install), then added evolution by: yum install evolution evolution-bogofilter
After installation I've added an account via add account in Evolution.

Later today I'll add screenshots of my account settings.

Comment 6 markm 2013-07-20 17:40:18 UTC
Created attachment 776214 [details]
Receving emails setting

Comment 7 markm 2013-07-20 17:40:40 UTC
Created attachment 776215 [details]
Sending emails settings

Comment 8 markm 2013-07-20 17:48:06 UTC
Those settings used to work for ages, at least they worked fine in Evolution on Fedora 17, I've skipped 18, now I am trying to use Evolution on Fedora 19.

It's very annoying cause as from the moment I send an email (by typing a password), I am unable to receive emails. When I close Evolution and open it again, it asks about account password, which means I have to go to the google.com website and generate new application password...

Comment 9 Milan Crha 2013-07-22 09:42:31 UTC
Weird, I configured the same setup as you, the IMAP+ is GMail, the SMTP is another authenticated server, and I do not see the password lost error. Can this be due to migration? What if you delete the current account and re-enter it from scratch?

Comment 10 markm 2013-07-22 10:18:17 UTC
I just did this exercise again:

I've deleted all evolution accounts, all cache files etc., then started evolution again:

Added a new account, set it to receive email from gmail via imap+; sending set to send via my private mail server. Downloaded all emails in minutes, sent a test email to my other email, got asked for a password for "Personal" account, entered my smtp password... few seconds later, after the email was sent got a popup to enter a password for "Personal" account again -- had to enter my gmail account password to receive mail again.

As I use 2-step verification with google and per-apps password, it's very annoying and frustrating.

Comment 11 markm 2013-07-22 10:36:19 UTC
I've done it also on my spare test laptop, fresh F19 with MATE Desktop installed, evolution installed, added my gmail account as imap source with smtp server set to my personal server. Got asked for password to access gmail (correct); got asked to send a test email (correct); then closed evolution, run it again and... got asked for password to access my gmail account -- this is where I would expect evolution to remember my password.

When I run seahorse though... I see just one password stored for "Evolution Data Source 1374488329.8844.12@ideapad", when I check password - it's my gmail account's password; after sending an email, data source name does not change, but stored password is the one for my smtp account.

Hence there's a bug -- Evolution stores one password per account (as an account added to the evolution), not one password per username+server combination (which is desired).

Comment 12 markm 2013-07-22 10:38:27 UTC
(In reply to Milan Crha from comment #9)
> Weird, I configured the same setup as you, the IMAP+ is GMail, the SMTP is
> another authenticated server, and I do not see the password lost error. Can
> this be due to migration? What if you delete the current account and
> re-enter it from scratch?

Do you use same password for both accounts? If yes, then it will work for you just fine; I have different passwords, hence it does not work for me as Evolution stores just one password per account (not per username+server combination).

Comment 13 Milan Crha 2013-07-22 10:50:03 UTC
Mine passwords are different too. I use evolution to enter the accounts, not GNOME Online Accounts (these may share passwords), and when evolution tries to Lookup for server settings, I simply "Skip Lookup" it, and enter everything on my own. Especially the OAuth based accounts might share the password settings - that's the idea behind OAuth, I believe. Of course, this doesn't work completely with the two-factor authentication.

Comment 14 markm 2013-07-22 11:06:13 UTC
I did press "skip lookup" too. I don't understand why per-apps password would not work with new evolution. I simply created an unique password for Evolution on accounts.google.com, this password is entered as imap account's password.
No idea why Evolution would want to store only one password per account.

Comment 15 markm 2013-07-22 11:54:05 UTC
One more test:

Fresh installation of Fedora 19 + MATE Desktop in VM from netinst.iso (64bit).

Installed evolution and seahorse only, added my account (pressed skip lookup), exactly same behaviour -- one password stored per account, entering an smtp password when sending email overwrites the imap password.

Note, I don't know what "Gnome Online Accounts" is -- I don't see it in my control centre or on the apps list.

Comment 16 markm 2013-07-22 12:21:58 UTC
So just to be completely sure, I've installed fresh Fedora 19 with Gnome 3 desktop (the default one), evolution and seahorse were already installed.

Started evolution, added a new account (gmail as imap, my personal as smtp, different user names, different password). Created a password for imap, entered it, got mail downloading... tried to send an email, entered smtp password... email sent. Checked Seahorse, one password entry stored with smtp password; started evolution and got asked about the password for imap account.

I did not set up "on-line accounts" when logged in for the first time and I clicked "skip lookup".

So the problem exists, is easily repeatable and does not relate to the desktop environment evolution is running on. See screenshots attached.

Comment 17 markm 2013-07-22 12:22:50 UTC
Created attachment 776885 [details]
Evolution asks for password after en email was sent

Comment 18 Milan Crha 2013-07-22 17:13:41 UTC
Well, I cannot reproduce it, this it might not be that easy.

Could you close evolution, go to
   ~/.config/evolution/sources
and pack all the files you'll see there, please? The files will contain your email address and the private server address, thus replace them with some "xxx" or similar letter, to not expose anything you do not want to share in public. There might be visible from the files how they are connected together and hopefully why the accounts share the password.

Comment 19 markm 2013-07-22 20:13:21 UTC
Created attachment 777052 [details]
sources attached

Comment 20 markm 2013-07-22 20:16:33 UTC
this is really strange -- I can easily reproduce the issue, I've done this exercise 3 times earlier today... and I am not doing anything but just adding an account through the wizard. I can record a screen cast or video :)

Comment 21 Milan Crha 2013-07-23 05:32:00 UTC
Ah, I see the difference. I didn't let evolution add the Google Calendar, neither the Address book, thus the password is saved separately for me. If I add at least the Contacts (left the checkbox checked at the end of the new mail account wizard) then I get the same behaviour as you. A workaround is to not check any of the extra checkboxes at the last page of the wizard (neither Contacts, nor Calendar) and add these manually (File->New->Address book->Google->...).

I'm moving this upstream as [1], because this is not a Fedora-specific issue. Please see [1] for any further updates and thanks for the patience during the investigation.

[1] https://bugzilla.gnome.org/show_bug.cgi?id=704725

Comment 22 markm 2013-07-23 08:36:48 UTC
Indeed I was leaving "contacts" checked :)
I've tested it again, added an account without linking contacts/calendar and all seems to work good. Many thanks for helping me to get to the root cause of the issue and for a simple workaround!

Comment 23 Milan Crha 2013-07-23 10:44:51 UTC
Good :) One would not believe what one check in configuration can cause.

Comment 24 h0wdyd3wdy 2013-10-16 19:24:26 UTC
I seem to be having the same problem.

1. Gmail incoming imap
2. ISP outgoing smtp

Two different accounts.

It seems to only save one password at a time, so it keeps changing the password b/w the two accounts.  Since it's an app specific password for #1, and #2 requires at least one number, I can't set it to the same password.  

What can I do?  F19.

Comment 25 Milan Crha 2013-10-17 07:08:40 UTC
See comment #21, you can workaround the issue if you enter the account in evolution and _do not_ let evolution add Contacts nor Calendar for the account (you can add both separately too). Then the passwords for receiving and sending part can be different.

Comment 26 h0wdyd3wdy 2013-10-17 07:13:18 UTC
Ok, but the thing is, it also shows my gmail account with a "plug" which seems to be imported from gnome.  I can't delete this one.  So, I have two instances of the account.  What do I do in this case?

Comment 27 Milan Crha 2013-10-17 09:03:43 UTC
The plug icon means you added the GMail account in GNOME Online Accounts. Go to Control Center->Online Accounts and either drop the account entirely, or disable Mail part of it.

Comment 28 Milan Crha 2013-11-05 11:00:30 UTC
*** Bug 1024083 has been marked as a duplicate of this bug. ***