Bug 293271 - KMail doesn't remember the SMTP password
Summary: KMail doesn't remember the SMTP password
Status: RESOLVED FIXED
Alias: None
Product: kmail2
Classification: Unclassified
Component: general (show other bugs)
Version: 4.9.0
Platform: openSUSE RPMs Linux
: NOR major with 80 votes (vote)
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
: 284543 295010 296564 302637 309873 309969 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-02-04 09:18 UTC by Unknown
Modified: 2013-02-21 21:48 UTC (History)
32 users (show)

See Also:
Latest Commit:
Version Fixed In: 4.10


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Unknown 2012-02-04 09:18:29 UTC
Version:           4.8 (using KDE 4.8.0) 
OS:                Linux

1.) Have 2 pass authentication with GMail > you'll never know the application password any more
2.) Feed that lengthy password with KMail while you're setting up a dIMAP account with SMTP correctly
3.) Use KWallet to store the passwords
4.) Restart KDE, fully
5.) After KMail had started, the first letter cannot be sent because the program asks for password (which I don't know any more).
6.) Quit KMail, close the password dialogue.
7.) Open KMail again and now you can send that letter without being prompted for the pass

Reproducible: Always



Expected Results:  
 

OS: Linux (x86_64) release 3.1.9-1.4-desktop
Compiler: gcc
Comment 1 Laurent Montel 2012-02-04 14:14:42 UTC
Don't understand It send email without password ?
Comment 2 Unknown 2012-02-04 14:20:07 UTC
No. For the second start it somehow recognizes that KWallet already provides the password.

- Start KDE
- For the first time KMail asks for the password, although I stored it in KWallet.
- Then I quit from KMail and Cancel the password box
- That's why there will be an unsent mail in the outbox folder
- I start KMail again and then choose to send queued mails from the outbox folder
- KMail sends that letter (from now on, please have a look at Bug 293272)
Comment 3 Michael Stenzel 2012-03-01 00:06:40 UTC
Hello,

I have problems with kmail password saving too.

Sometimes it forgets the password for sending mails (prompts for password
on sending mail), but the password is saved in kwallet and works like 90%
of the time.

Running KDE 4.8.0 on slackware64-current
Comment 4 Al 2012-03-02 01:47:29 UTC
isn't this the same as:
  https://bugs.kde.org/show_bug.cgi?id=261559
?
Comment 5 m.eik michalke 2012-03-24 14:57:08 UTC
(In reply to comment #4)
> isn't this the same as:
>   https://bugs.kde.org/show_bug.cgi?id=261559

no, i have the same issue from time to time (KDE 4.8.1, kubuntu packages), but don't get that kwallet error message.

for the most part, kmail2 fetches passwords from kwallet, but sometimes it doesn't. this usually only affects SMTP: when i want to send a mail, i suddenly get the password input dialog for the SMTP server. i then manually search kwallet for the password, which is actually still stored there, copy it to the dialog, the mail gets sent, and from now on (and for the next couple of KDE sessions) sending mails works fine.

this seems to be related to another issue i sometimes observe: kmail2 claims the SSL certificate of the POP3 server (same account) doesn't match, and it doesn't matter how often you say "accept this from now on", it will bother you again and again, almost(!) every time it wants to check mails. when it takes too long to "accept" the certificate, the mail server rejected the connection in the meantime, and when kmail wants to check mails the next time, it suddenly also prompts for the POP3 password. when this is the case, the SMTP issue is also present. the next few days it's ok, then al of this comes up again.
Comment 6 Christian Trippe 2012-03-31 11:17:10 UTC
Probably related/duplicated reports bugs:
bug 295010
bug 296564
Comment 7 Will Stephenson 2012-04-21 09:41:32 UTC
*** Bug 295010 has been marked as a duplicate of this bug. ***
Comment 8 Will Stephenson 2012-04-21 09:41:49 UTC
*** Bug 296564 has been marked as a duplicate of this bug. ***
Comment 9 Blackpaw 2012-04-25 22:26:29 UTC
I've been getting this one since kde 4.81 as well (Kubuntu 12.04). Glad I read the bug report as I didn't realise that canceling the send and retrying would would succeed. Looks like some sort of timing issue with accessing kwallet?

The problem only happens on the first send of each akonadi session, i.eI I can recreate it by closing kmail and restarting akonadi.

Additionally - I have to identities/email servers set up. The problem will occur for the first send no matter what email server I use but is fine there after, i.e:

* Restart akonadi
* Send to SMTP1. 
  - Get Popup.
  - Cancel.
  - Resend
  - No Popup
  - Send to SMTP1
  - No popup 
  - Send to SMTP2
  - No popup

* Restart akonadi
* Send to SMTP2
  - Get Popup.
  - Cancel.
  - Resend
  - No Popup
  - Send to SMTP1
  - No popup 
  - Send to SMTP2
  - No popup

So it looks like the very first attempt to get a password fails, everything else there after is ok

Also - this happens occasionaly with IMAP access as well, but very rarely, but the SMTP one happens 100%
Comment 10 Blackpaw 2012-04-25 22:30:15 UTC
Forget setup deatils:

Qt: 4.8.1
KDE Development Platform: 4.8.2 (4.8.2)
kde4-config: 1.0

Kubuntu 12.04 64 bit RC (all updates)

SMTP1 - GMail with two factor auth

SMTP2 - MDaemon Mail server, plain password, no ssl
Comment 11 Christopher Heiny 2012-04-25 22:38:20 UTC
Re: Comment #9 - for me, this problem manifests itself at random intervals.  Sometimes on the first email sent, sometimes after several emails have been sent.  It's not as repeatable for me as it is for Blackpaw, but happens a couple of times per day.  If I notice a pattern, I'll update you.
Comment 12 George L. Emigh 2012-05-15 21:31:58 UTC
Gentoo
KDE Platform Version 4.8.3

Since several versions Kmail randomly forgets SMTP password and prompts for it.
Comment 13 Markus Blaschke 2012-06-12 08:05:01 UTC
*** This bug has been confirmed by popular vote. ***
Comment 14 Christoph Feck 2012-06-28 22:54:02 UTC
*** Bug 302637 has been marked as a duplicate of this bug. ***
Comment 15 Suren Karapetyan 2012-07-16 06:51:24 UTC
I can reproduce this 100% of the time on my system (kde 4.8.4).
KMail asks for the password only while sending the first message. After that all future messages are snet without problems. The password *is* getting stored in the wallet but for some reason kmail doesn't read it.
Comment 16 George L. Emigh 2012-08-30 18:09:08 UTC
KDE 4.9.0
Gentoo

KMail still asks for the password when sending the first message, after that it seems to remember it.

Since I power down my machine each day I see this daily.

Thank you.
Comment 17 Christophe Giboudeaux 2012-09-02 11:08:37 UTC
just to be sure: you all followed this howto ? http://support.google.com/mail/bin/answer.py?hl=en&answer=1173270
Comment 18 Rettich 2012-09-02 14:40:49 UTC
I have the same problem with mein own mail server (postfix). It is not related to Google Mail.

I figured out, that Akonadi only asks once for the password, because after that, it is stored in memory. If you restart Akonadi (which also happens when you logout/login), it will ask for the password again (instead of using kwallet).
Comment 19 George L. Emigh 2012-09-02 19:16:38 UTC
(In reply to comment #17)
> just to be sure: you all followed this howto ?
> http://support.google.com/mail/bin/answer.py?hl=en&answer=1173270

As insane as it sounds I have 10 different email accounts, of the few that I actually send mail from only one is a gmail acount, and no matter which one I send from first the problem exists, if the second message is sent thru a different account it is fine, only the first email sent has the problem for me.

So it has nothing to do with google's email specifics, kmail just asks for the password for the first email sent.

But thanks for trying.
Comment 20 Peter Mühlenpfordt 2012-09-03 06:26:45 UTC
I have no gmail account for sending mail, just one gmx and two private mailservers.
After akonadi restart I'm asked for the password of the first account I'm sending mail with, but not for any further mails sending from this or any other account (with different passwords).
If I enter a wrong password I cannot send mails from the 'first' account until another akonadi restart - no second chance to enter the correct password. But sending with all other accounts still works fine.
Comment 21 Christopher Heiny 2012-09-04 15:48:58 UTC
(In reply to comment #17)
> just to be sure: you all followed this howto ?
> http://support.google.com/mail/bin/answer.py?hl=en&answer=1173270

As others have mentioned, this seems to have no bearing on the problem.  It happens with the first email sent, regardless of whether it's Gmail, Yahoo, work account, or my private box at home.
Comment 22 Blackpaw 2012-09-11 22:11:08 UTC
I was getting this behaviour - first send (no matter what account) asked for the password but oddly enough, this has stopped happening on my desktop. Just noticed today when I rebooted. did a few more tests, definitely fixed. Could have been any round of updates in the last week as I reboot (and hence restart akonadi) very rarely.

I haven't made any config changes that I'm aware of.

kde4-config --version
Qt: 4.8.2
KDE Development Platform: 4.9.00
kde4-config: 1.0

lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 12.04.1 LTS
Release:        12.04
Codename:       precise
Comment 23 Adrian Piotrowicz 2012-09-12 07:32:38 UTC
No change for me. Few minutes ago i was asked for password at first but at second attempt it worked correctly (mail was send without asking for password).
Machine was not rebooted since yesterday, however i've sent emails yesterday from the same account.

All software updates were installed 2 hours ago.

$ kde4-config --version
Qt: 4.8.2
KDE: 4.9.00
kde4-config: 1.0

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 12.04.1 LTS
Release:        12.04
Codename:       precise
Comment 24 Myriam Schweingruber 2012-10-03 10:03:40 UTC
*** Bug 284543 has been marked as a duplicate of this bug. ***
Comment 25 Pepe 2012-10-03 10:09:01 UTC
I have also this bug with Kubuntu 12.04.

kde4-config --version
Qt : 4.8.1
KDE : 4.8.5 (4.8.5)
kde4-config : 1.0
 lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 12.04.1 LTS (upgrade from 11.10)
Release:        12.04
Codename:       precise
Comment 26 Rudy Raab 2012-10-03 14:01:22 UTC
I'm getting this bug too, on OpenSUSE 12.2 x64 with KDE 4.9.1. Haven't tested 4.9.2 yet, as I've been using Thunderbird. But I want to use KMail. The behavior that I remember is the same as the others reported-- prompts for the password the first time but remembers it after that. KWallet has the passwords stored. Also, I have two Gmail accounts, and once it prompts for the password for one, I believe it remembers the pass for the other. 

As for the age of this bug, I remember it happening back in KDE 4.7. 

And as with the other commenters:
kde4-config --version
Qt: 4.8.3
KDE Development Platform: 4.9.2 "release 511"
kde4-config: 1.0

lsb_release -a
LSB Version:    core-2.0-noarch:core-3.2-noarch:core-4.0-noarch:core-2.0-x86_64:core-3.2-x86_64:core-4.0-x86_64:desktop-4.0-amd64:desktop-4.0-noarch:graphics-2.0-amd64:graphics-2.0-noarch:graphics-3.2-amd64:graphics-3.2-noarch:graphics-4.0-amd64:graphics-4.0-noarch
Distributor ID: SUSE LINUX
Description:    openSUSE 12.2 (x86_64)
Release:        12.2
Codename:       Mantis
Comment 27 Laurent Montel 2012-10-03 14:16:50 UTC
it doesn't start kwallet ?
Comment 28 Rudy Raab 2012-10-03 14:31:00 UTC
(In reply to comment #27)
> it doesn't start kwallet ?

In my case at least, kwallet starts (and prompts for its own password) on system startup, and is already running  and the wallet is open when I first open kmail.
Comment 29 Christopher Heiny 2012-10-03 15:28:48 UTC
(In reply to comment #27)
> it doesn't start kwallet ?

In my case, kwallet has been started either by the network manager (when on wireless) or by kmail itself (when on a wired network).  In both situations, kmail fails to recall the SMTP password when sending the first email..
Comment 30 francisco_t 2012-11-02 12:42:08 UTC
Confirm in kde 4.9.2, in kubuntu 12.10.
Comment 31 Dimitrios Glentadakis 2012-11-03 13:43:13 UTC
Same problem with Mageia 64 bit KDE 4.8.5 gmail imap
Some times, when i send a message it asks me the password for the first time. After, if i send other messages it does nt ask me the password again. After some reboots i may occur the same problem again.
Comment 32 francisco_t 2012-11-05 18:18:04 UTC
In the same system with different user, one works, the other doesn't.

Difference:
An user has master password in kwallet (fails), and the other doesn't (works)
An user has special characters in password (fails), and the other only alphanumeric (works)
An user has two SMTP counts (fails), and the other only one (works)

Anyone with a similar case??
Comment 33 Rudy Raab 2012-11-06 01:31:14 UTC
(In reply to comment #32)
> In the same system with different user, one works, the other doesn't.
> 
> Difference:
> An user has master password in kwallet (fails), and the other doesn't (works)
> An user has special characters in password (fails), and the other only
> alphanumeric (works)
> An user has two SMTP counts (fails), and the other only one (works)
> 
> Anyone with a similar case??

In my case I have two SMTP accounts as well. And do you mean the kwallet password having special characters? Mine is alphanumeric and exhibits the bug at hand.
Comment 34 francisco_t 2012-11-06 09:43:43 UTC
Sorry, clarification: Special characters like this []{}()+*#& in SMTP password, not kwallet.
SMTP password %$&() fails.
SMTP password abc123 works.

tThese are the differences between two users that works and does not. I don't know if any issue

I don't know if any or all cases could affect the bug.



> ----- Mensaje original -----
> De: Rudy Raab
> Enviado: 06-11-12 02:31
> Para: leviatan1@gmx.com
> Asunto: [Bug 293271] KMail doesn't remember the SMTP password
> 
> https://bugs.kde.org/show_bug.cgi?id=293271
> 
> --- Comment #33 from Rudy Raab <rrrperson@gmail.com> ---
> (In reply to comment #32)
> > In the same system with different user, one works, the other doesn't.
> > 
> > Difference:
> > An user has master password in kwallet (fails), and the other doesn't (works)
> > An user has special characters in password (fails), and the other only
> > alphanumeric (works)
> > An user has two SMTP counts (fails), and the other only one (works)
> > 
> > Anyone with a similar case??
> 
> In my case I have two SMTP accounts as well. And do you mean the kwallet
> password having special characters? Mine is alphanumeric and exhibits the bug
> at hand.
> 
> -- 
> You are receiving this mail because:
> You voted for the bug.
> You are on the CC list for the bug.
Comment 35 Adrian Piotrowicz 2012-11-06 09:49:09 UTC
In my case it looks like that:
- no master password
- multiple SMTP accounts
- only alphanumeric passwords on all accounts

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 12.10
Release:        12.10
Codename:       quantal

$ kde4-config --version
Qt: 4.8.3
KDE: 4.9.2
kde4-config: 1.0
Comment 36 Unknown 2012-11-06 10:21:13 UTC
While I used to have multiple SMTP accounts, this problem was present, but now I have only one account and I don't experience this issue any more.
Comment 37 francisco_t 2012-11-06 10:31:25 UTC
Can someone delete Rudy Raab mail's  my mail and in my comment #34?

My apologies.
Comment 38 Laurent Montel 2012-11-10 23:48:42 UTC
*** Bug 309873 has been marked as a duplicate of this bug. ***
Comment 39 Laurent Montel 2012-11-13 12:04:42 UTC
*** Bug 309969 has been marked as a duplicate of this bug. ***
Comment 40 George L. Emigh 2012-11-13 18:33:58 UTC
Has happened several times to me in the last week including today.
I have multiple smtp / pop / imap accounts
no master password on kwallet

$ kde4-config --version
Qt: 4.8.3
KDE Development Platform: 4.9.3
kde4-config: 1.0

$ lsb_release -a
LSB Version:    n/a
Distributor ID: Gentoo
Description:    Gentoo Base System release 2.1
Release:        2.1
Codename:       n/a
Comment 41 francisco_t 2012-11-13 22:47:03 UTC
If kwallet save 1 password, the problem disappears.
My temporary solution was 2 accounts, only save one password.
Comment 42 David Faure 2012-12-23 17:38:25 UTC
Patch under review: https://git.reviewboard.kde.org/r/107885/
Comment 43 David Faure 2012-12-28 09:58:04 UTC
Git commit f40a4973e8c00875c351c8cc3d30bd481ef5c68b by David Faure.
Committed on 23/12/2012 at 16:13.
Pushed by dfaure into branch 'KDE/4.10'.

Load passwords async on startup, rather than sync

(which was giving 4 nested event loops, with 4 transports, on kmail startup)
This fixes the password dialog appearing when sending the first email.
FIXED-IN: 4.10

M  +0    -9    mailtransport/transport.cpp
M  +1    -0    mailtransport/transportmanager.cpp

http://commits.kde.org/kdepimlibs/f40a4973e8c00875c351c8cc3d30bd481ef5c68b