Mail password problems

Bug #1623381 reported by Stefan A. B.
26
This bug affects 5 people
Affects Status Importance Assigned to Milestone
Mail
New
Undecided
Unassigned

Bug Description

One problem I encountered using Pantheon Mail in eOS Loki:

I am using Pantheon Mail with 3 mail accounts. Everytime I log in to eOS Loki mail keeps asking for passwords although the checkbox for remembering passwords is checked.

Thank you for your help and suggestions. If it helps I could upload a screenshot of the error message in german language.

Edit: Splitted the two Bugs

Revision history for this message
Marc (noviluni) wrote :

Why did you put two bugs in just one? Could you separate them? I have the first problem but the second thing doesn't affect me.

Revision history for this message
Ralph Plawetzki (purejava) wrote :

It sounds like gnome-keyring-daemon isn't running. Can you check with ps that the daemon is executing in the background?

summary: - Mail certificate and password problems
+ Mail password problems
description: updated
Revision history for this message
Ralph Plawetzki (purejava) wrote :

Mail uses gcr-3 for storing / pinning certificates. It does sound like something's not configured or installed correctly. Mail doesn't really make heavy use of gcr-3. Basically, it merely queries if a certificate is pinned and if the user requests it Mail will pin a certificate. That's it.

Revision history for this message
Stefan A. B. (steveb13687) wrote :

I splitted the two Bugs into seperate reports...

@Ralph: Running ps -eo 'tty,pid,comm' | grep ^? in terminal shows me this running daemon, besides all the rest:

? 1916 gnome-keyring-d

Hope this is what you expected...

Revision history for this message
Ralph Plawetzki (purejava) wrote :

Could you post the output of
$ ps aux | grep key

please? You can hide your user for privacy reasons if you want.

And could you check if the passwords you entered are stored in the keyring?

Easiest way to check is to install seahorse.

There should be a login keyring that has two keys:
org.pantheon.mail imap_username:<your e-mail>
org.pantheon.mail smtp_username:<your e-mail>

Revision history for this message
Stefan A. B. (steveb13687) wrote :

Output of $ ps aux | grep key:

username 3150 0.1 0.1 378992 9660 ? SLl 18:57 0:00 /usr/bin/gnome-keyring-daemon --start --components=pkcs11
username 5460 0.0 0.0 38888 976 pts/0 S+ 19:00 0:00 grep --color=auto key

Seahorse (thx btw very nice tool :-)) shows me that all imap and smtp passwords are listed...

Revision history for this message
Marc (noviluni) wrote :

If it's useful. Here with the same problem:

username 2994 0.0 0.1 230452 6896 ? SLl 11:05 0:01 /usr/bin/gnome-keyring-daemon --daemonize --login
username 15279 0.0 0.0 38888 1028 pts/2 S+ 19:44 0:00 grep --color=auto key

Revision history for this message
Ralph Plawetzki (purejava) wrote : Re: [Bug 1623381] Re: Mail password problems

Am 14.09.2016 um 19:05 schrieb Stefan A. B.:
> Output of $ ps aux | grep key:
>
> username 3150 0.1 0.1 378992 9660 ? SLl 18:57 0:00 /usr/bin/gnome-keyring-daemon --start --components=pkcs11
> username 5460 0.0 0.0 38888 976 pts/0 S+ 19:00 0:00 grep --color=auto key

This looks good.

> Seahorse (thx btw very nice tool :-)) shows me that all imap and smtp
> passwords are listed...

Ok, at least communication between Mail and gnome-keyring-daemon
succeeded once and the passwords git stored. Question is, why this
stopped working.

Do you have auto login enabled for your user?
Seahorse shows the name of the keyring the passwords are stored in on
the left. The keyring should be named login or "Anmeldung" when your
language settings in switchboard are set to German.

When elemetary OS is booted and you logged yourself in, the keyring
should be locked in case you have auto login enabled and unlocked in
case you hav auto login disabled.

In the former case starting Mail prompts you to enter the password to
unlock the keyring, Mail reads the imap password from the unlocked
keyring and displays your inbox.

In the latter case starting Mail reads the imap password from the
already unlocked keyring and displays your inbox.

Which part is missing on your system?

Revision history for this message
Ralph Plawetzki (purejava) wrote :

Am 14.09.2016 um 19:46 schrieb Marc:
> If it's useful. Here with the same problem:
>
> username 2994 0.0 0.1 230452 6896 ? SLl 11:05 0:01 /usr/bin/gnome-keyring-daemon --daemonize --login
> username 15279 0.0 0.0 38888 1028 pts/2 S+ 19:44 0:00 grep --color=auto key

Hm, not sure whether the daemon should be invoked with the --start option.

Do you have the passwords stored in your keyring?

Revision history for this message
Stefan A. B. (steveb13687) wrote :

Ia m suing auto login. After boot eOS asks me to unlock the keyring... Btw after installing an update yesterday the problem seems to be gone today.

I will keep you informed if it shows up again.

Revision history for this message
Ralph Plawetzki (purejava) wrote :

Am 15.09.2016 um 12:12 schrieb Stefan A. B.:
> Ia m suing auto login. After boot eOS asks me to unlock the keyring...

The prompt right after booting means that there is some other component
that tries to read a password from the keyring. Mail does not do that
after booting the desktop but the moment you start Mail.

So, if this occurs again, for testing purposes it would be good to
disable other components that access the keyring (Evolution?) and see if
Mail can unlock it on start of Mail.

Revision history for this message
Stefan A. B. (steveb13687) wrote :

The prompt after booting doesn't bother me at all thats ok. The problem is that Mail ist starting although auto start is disabled an asks for passwords for mail accounts at the same time at start up (funny thing: it changes from boot to boot between the 3 mail accounts, sometimes it asks for one pw sometimes for two etc.).

I'm not using any other mail client like evolution etc.

Revision history for this message
Marc (noviluni) wrote :

I solve it deleting all data in ~/.local/share/pantheon-mail (sudo mode) and then deleting all passwords in seahorse (ALL passwords, not only "geary/pantheon-mail" passwords).

Thank you very much.

Revision history for this message
Stefan A. B. (steveb13687) wrote :

Tried this workaround on my chromebook. Seems to be working fine. I will also test it on my main machine today or tomorrow.

Thank you very much so far!

Revision history for this message
Ralph Plawetzki (purejava) wrote :

There is a way to check from the command line that gnome-keyring is working:
$ secret-tool lookup user "org.pantheon.mail imap_username:<email address hidden>"

<email address hidden> should be replaced with the actual e-mail address you use in Mail of course.

Revision history for this message
Stefan A. B. (steveb13687) wrote :

Update: Workaround is doing it on both machines. Easy and satisfying!

Thx

Revision history for this message
Marc (noviluni) wrote :

Notes (if someone wants to reproduce it):

- I think that if you introduces an incorrect password the first time, pantheon-mail save it in the "keyring". Then every time, even if you check "remember password" it doesn't change the password. I tried first changing the password in seahorse but every time pantheon-mail starts it changes again to the first password.

- Another important thing: Normally when you deletes ~/.local/share/pantheon-mail (in sudo mode) it should delete all accounts in pantheon-mail, but it doesn't happen. When I open pantheon-mail again there is no folders BUT accounts are there.

Could you try it? Maybe it's a bug, maybe it's my computer.

Revision history for this message
Stefan A. B. (steveb13687) wrote :

- I'm sure that i entered the correct passwords for my accounts in the first case.

- In my case after reboot Mail asked me to create new accounts, no leftovers from the initial accounts. Everything worked fine.

Revision history for this message
Marc (noviluni) wrote :

Thanks

Revision history for this message
Ralph Plawetzki (purejava) wrote :

Am 21.09.2016 um 12:20 schrieb Marc:
> - I think that if you introduces an incorrect password the first time,
> pantheon-mail save it in the "keyring". Then every time, even if you
> check "remember password" it doesn't change the password. I tried first
> changing the password in seahorse but every time pantheon-mail starts it
> changes again to the first password.

No, that's wrong. Mail tries to log you on with the password you
entered. If this succeeds it saves the password in the keyring.

If the password is wrong, Mail prompts you again.

> - Another important thing: Normally when you deletes ~/.local/share
> /pantheon-mail (in sudo mode) it should delete all accounts in pantheon-
> mail, but it doesn't happen. When I open pantheon-mail again there is no
> folders BUT accounts are there.

That's wrong too. Mail stores all info about accounts it knows in the
path you wrote above.
If you delete the directories in that path, Mail does not know any
accounts any more and displays the initial "create account" dialog.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.