Bug 284703

Summary: kmail stop sending mail
Product: [Applications] kmail2 Reporter: Yngve Levinsen <yngve>
Component: generalAssignee: kdepim bugs <kdepim-bugs>
Status: RESOLVED DUPLICATE    
Severity: normal CC: amantia, aspotashev
Priority: NOR    
Version: 1.99.0   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: akonadiconsole showing the mda thing.
kmail sending progress after several minutes

Description Yngve Levinsen 2011-10-22 13:32:23 UTC
Version:           1.99.0 (using KDE 4.7.2) 
OS:                Linux

Sometimes KMail decides to stop sending my e-mails. I am quite unsure what triggers this, and so I tried at first to ask on the mailing list. See http://lists.kde.org/?l=kdepim-users&m=131914525718759&w=2

What happens is that the mails are being sent, but never succeeds. My impression is that restarting KMail does not solve the problem. Restarting the machine does. Restarting Akonadi probably does as well, but I haven't succeeded in solving it that way yet.

Mail checking works as before, and I continue to receive mails from what I can understand.

I just had this problem again now, and *this* particular time, I got asked to open my password wallet when I clicked on "send the messages in the queue" for the outbox folder. The mails were then sent (so I cannot provide detailed checks now). Other times this has not happened, and doing this has resolved nothing. When I clicked "send e-mail" initially, I was not asked for password. Could there be some kind of bug between KMail and the KDE Wallet system?

I have four imap accounts, one mbox account (reading /var/spool/mail) and one maildir (which I think is the "local folders" and does not have an official path to reside in the settings). I was suggested to see if disabeling the mbox account helped any, but haven't had the chance to test this yet.

I will try to update with further info and I am of course available for any questions. I open this bug report now so that if others observe a similar problem we can collect info.

For anyone that observes this bug, could you try to check (as per mail from Andras Mantia):
1) does the Mail Dispatcher Agent running (you can check in akonadiconsole)
2) if yes, is it online?
3) do you have an MBOX account?
4) if you run a mail check in KMail, can you see it checks all your 
accounts?
5) can you send the mails by right-clicking on Outbox and using Send Queued 
Messages?



Reproducible: Sometimes

Steps to Reproduce:
Ehm, keep KMail open for a while. Unsure what triggers it. Send an e-mail.

Actual Results:  
E-mails are left in the outbox, never sent. The status bar in lower right corner never finish.

Expected Results:  
E-mails are sent.

OS: Linux (x86_64) release 3.0-ARCH
Compiler: gcc
Comment 1 Yngve Levinsen 2011-11-01 16:26:23 UTC
I'm in limbo!

So, here are my answers:

1) Hmm, yes? I'll upload a screenshot. I notice it says "Sending <mail title>". However, this was the mail that was never sent. I deleted it since it was too late to send (already had a reply by phone), and have now added a test mail to myself in the sending queue.

2) Hmm, yes? How do I see that? Check attachement.

3) Yes.

4) If I run mail check all accounts seem to be checked as normal. I also tried to send an e-mail from my gmail to one of my other accounts. I got it within a second of clicking send in the web application (using push imap, it rocks hard guys!).

5) Yes. Again this looks like some communication problems. I clicked on the minus sign in the second attachement, to cancel the send operation. Clicking "Send Queued Messages" then opened the kwallet and asked for password. Afterwards the test mail was sent as normal.

I am quite sure that this particular solution did not work in the past, but the problem might have been related. Perhaps you made some bug fixes in the latest 4.7 branch which has improved the situation. 

It is a hard bug to report since you have to wait for something that for me typically happened once or twice a week in the past. I am suggesting that one way to reproduce is to set kwallet to close after x minutes of inactivity, and then wait until it is closed and try to send an e-mail. It will ask for password most of the times, but sometimes not (for me).
Comment 2 Yngve Levinsen 2011-11-01 16:30:22 UTC
Created attachment 65125 [details]
akonadiconsole showing the mda thing.
Comment 3 Yngve Levinsen 2011-11-01 16:31:08 UTC
Created attachment 65126 [details]
kmail sending progress after several minutes

This is just after I hit "check for new messages" to see if I could still receieve mail.
Comment 4 Yngve Levinsen 2011-11-01 16:34:03 UTC
Sudden idea: Could it be that KMail check if the wallet is open when you start writing a new message, which would trigger this bug if the wallet is closed while you write the message? I was spending quite a while writing it because I was creating some instructions for the receiver to follow.
Comment 5 András Manţia 2011-12-10 08:10:57 UTC
The wallet issue is worth verifying (could you try to reproduce it)? The mail dispatcher agent going offline was fixed in 4.7.4, so make sure to repeat the tests with 4.7.4.
Comment 6 Yngve Levinsen 2011-12-10 13:12:42 UTC
Sorry, some unrelated issues with Akonadi/latest kernel (or something like that) ended in me ruining the entire Akonadi configuration files, and now I cannot add accounts to KMail anymore (that is, I can but it never starts adding the folders of the account). 

I plan on reinstalling everything on my computer with a new SSD disk I just bought during the Christmas break, so I am not planning on fixing these unrelated issues since I have very little time these days. I apologise.

As a result I am unable to test.
Comment 7 Yngve Levinsen 2012-01-10 13:34:19 UTC
After a fresh install (I've moved back to Chakra now which has matured sufficiently for me), I haven't had this problem for several weeks.

I noticed though, after hibernate that it looks like I have to restart Kontact to get mail received/sent. I don't get the impression the two are related but I am no expert.

As for this bug report, unless someone else reports similar issues soon I would propose to close the report with "cannot reproduce". I cannot even reproduce it myself anymore.
Comment 8 Yngve Levinsen 2012-01-31 13:53:43 UTC
Hmm, interesting, problem is back. 

1) does the Mail Dispatcher Agent running (you can check in akonadiconsole)
Yes, it states "sending: <mail subject> (0%)"

2) if yes, is it online?
Yes, status is "Online, Running (0%)"

3) do you have an MBOX account?
I have maildir account, but no mbox accounts if I understand correctly. 

4) if you run a mail check in KMail, can you see it checks all your 
accounts?
Yes, it does. I still receive e-mails.

5) can you send the mails by right-clicking on Outbox and using Send Queued 
Messages?
Hmm, strange, I don't see that option by right-clicking the outbox folder. Perhaps I misunderstood something. In the "File" menu, the "Send queued messages" is greyed out.

I apologize, but these are work e-mails so I have to send them. There was no indication this time that the e-mails weren't sent, and nothing I found that could fix the problem other than restarting Kontact.

After a restart of Kontact, the option to "send queued messages" appeared in the right click menu of the outbox again. When clicking that, I got asked to open my KWallet again.

I am using Chakra Linux, with KDE 4.7.4 installed. It is difficult for me to give you a lot of info because usually when it happens it is confusing for me what is going on, and I usually need to send the e-mails immediately when I figure out. This time some of the e-mails had been sitting there for three hours. I do not believe I have done a lot of strange configuring this time. Please let me know if there are more tests I can do if it happens again. 

Before this happened I can say that I the computer was suspended to memory, brought to work, opened and then I tried to send e-mails. I thought I restarted Kontact but perhaps I didn't. I am using "internal mysql" if that makes a difference.

$ uname -a
Linux yngve-chakra 3.1-CHAKRA #1 SMP PREEMPT Tue Dec 6 22:49:14 UTC 2011 x86_64 Intel(R) Core(TM)2 Duo CPU P8600 @ 2.40GHz GenuineIntel GNU/Linux
Comment 9 Yngve Levinsen 2012-07-05 19:29:38 UTC
More than half a year, and I'm still the only one that have experienced this? I am currently on KDE 4.8.3 and the problem is still very much present. It (still) seems to be somehow related to suspend, I cannot remember having this issue from a normal boot. Hence, I guess laptop users are more prone to experience this problem.

It is quite annoying, two times this week I've had mails I thought I had sent, left in the outbox for several hours before realizing. Also annoying because I cannot give precise steps to reproduce of course, as it makes it that much more difficult to track down and fix :(
Comment 10 Yngve Levinsen 2012-08-20 09:21:05 UTC
OK, after some more digging I close this as duplicate. I'm 99% sure it is the same problem.

*** This bug has been marked as a duplicate of bug 275736 ***