Bug 310694

Summary: Kmail thinks it is offline, switching online as offered does not work
Product: [Applications] kmail2 Reporter: Christian Reiner <foss>
Component: generalAssignee: kdepim bugs <kdepim-bugs>
Status: RESOLVED UNMAINTAINED    
Severity: normal CC: as9902613, kdebugs, kdudka, keithzg, m.seifert, marcus.hardt, public, rafl, st.gruber, yeupou
Priority: NOR    
Version: 4.9.3   
Target Milestone: ---   
Platform: OpenSUSE   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: Output from the terminal after lanching akonadi start

Description Christian Reiner 2012-11-26 08:41:39 UTC
Sometimes KMail2 thinks it is offline, after startup when network is missing or during a session when internet connection is lost. Fine so far. 
KMail2 shows this message inside the main area: 
"KMail is currently in offline mode. Click here to go online . . ."
Klicking the "here" to do so never changes anything. 

When in these cases I use akonadiconsole to toggle the configured imap account online this works without a problem (1-2 secs) and also KMail2 then picks up activity again without a problem. 

Reproducible: Always

Steps to Reproduce:
1. Start KDE session without internet connection
2. Start KMail2, it will show the message that it is "offline"
3. Click the "here" in the message as offered to toggle to "online"
Actual Results:  
Nothing happens. 

Using the workaround mentioned in the description works on all cases. 

Expected Results:  
KMail2 should toggle to "online". 
I guess that means the imap ressource in akonadi should be toggled to "online".
Comment 1 Stefan Gruber 2013-01-21 20:17:35 UTC
same here. Always after resuming from suspend to ram.

KDE 4.9.5, opensuse 12.2
Comment 2 Alvise 2013-03-28 16:43:44 UTC
Is there a way to force kmail to go back online, without having to use akonadiconsole?

I mean: as long as these types of bugs related to akonadi are present, shouldn't we have an option in the menu of kmail to restart the akonadi framework?
Comment 3 Rafael Leal 2013-05-14 07:22:58 UTC
This occasionally happens to me when I start the computer. IMAP akonadi resources fail to go online, and stay offline until I manually restart the akonadi server (the akonadiconsole doesn't do it for me). The "go online" link in kmail doesn't do anything. 

This is a new behaviour in 4.10. 

I'm using OpenSUSE 12.3.
Comment 4 Stefan Gruber 2013-05-15 20:42:56 UTC
After suspend and resume the problem persisted with the 4.10-Versions under opensuse 12.2.
A few days ago I upgraded the system to opensuse 12.3 with up-to-date KDE 4.10.3 and this behaviour disappeared completely.
Comment 5 tony den haan 2013-06-12 10:44:20 UTC
happened to me on several occasions, and in all cases "click here" does indeed nothing at all.
Comment 6 Dimitrios Glentadakis 2013-12-18 07:30:19 UTC
Happens here too, with kmail 4.10.5 with google imap
I boot the computer and everything works fine (except the bug 326480)
After a couple of hours kmail stops to receive mails
I click on Refresh folders and it asks me to go online, but the status in the File menu is that i am online
i click on YES and kmail stays on 'Retreiving'
I try to toggle offline/online it doesnt work immediately
Kmail asks me again and again to clikc on OK to go online, even if i have answered yes previously
I click nothing happens
After many manipulations in akonadiconsole (toggle offline/online, restart server, refresh folders), it works again until the next time that it will stop receives mails.
Comment 7 Dimitrios Glentadakis 2013-12-18 08:11:00 UTC
Created attachment 84152 [details]
Output from the terminal after lanching akonadi start

I have put a comment in the file when the kmail went in a type of hidden offline mode
After i quit kmail and i launched it from the terminal
It worked, i put another comment in the file, and after it stopped working again
Comment 8 Dimitrios Glentadakis 2013-12-19 09:14:13 UTC
(In reply to comment #7)
> Created attachment 84152 [details]
> Output from the terminal after lanching akonadi start
> 
> I have put a comment in the file when the kmail went in a type of hidden
> offline mode
> After i quit kmail and i launched it from the terminal
> It worked, i put another comment in the file, and after it stopped working
> again

I deleted a filter of my pop account and it goes better now.
I will give feedback
Comment 9 Dimitrios Glentadakis 2013-12-19 14:48:38 UTC
It didn't help a lot
No kmail stays in retreiving message ....
Comment 10 Mathieu Roy 2014-02-10 10:05:40 UTC
Same here with Kmail 4.11.5 as distributed by Debian, failure after suspend to ram and no way to reactivate it unless restarting kmail (that is horrendously slow since kmail2)
Comment 11 Marcus Hardt 2015-02-13 09:46:29 UTC
I was tried to reproduce and workaround this one.

My setup is maybe strange, but it grew over time. I'm changing the IP to which my mailserver is resolved dynamically, regarding to whether I'm in VPN or not.

My suspicion was that akonadi_imap_resource cannot handle changing IPs and/or interfaces. I was trying to systematically reproduce it, but that's difficult. VPN didn't seem to be the problem, but switching from wlan to lan or vice versa was problematic.

However, it seems to help to kill all kdeinit and kde4 processes of your user. (Using kill -9, pkill -9 didn't work for me)

Hope this helps.
Comment 12 Agron Selimaj 2015-09-14 15:15:24 UTC
This bug has rendered KMAIL completely useless in the corporate environment.
Version 4.15.4 worked for a few days after a fresh install and then it got stuck at offline for the corporate imap account. There is nothing to make it go online. The menu option File>Work Offline it still says *Work Offline* while the imap account *Corp Email (Offline)*.
When I click File>Work Offline it becomes *Work Online* while the imap account is still *Corp Email (Offline)*.
When I right click on the *Corp Email (Offline)* and then choose *Update This Folder and All Its Subfolders*  it asks me this in a popup:
[Account "Corp Email"]
Before syncing folder "Corp Email" it is necessary to have the resource online. Do you want to make it online? <<Go Online>> <<Cancel>>

When I choose <<Go Online>> a message appears on the status bar at the bottom of the Kmail saying "KMail is set to be online; all network jobs will resume when a network connection is detected".

However, my network connection is fine. I am connected using hardwire not wifi. The connection all the way to the imap server is fine and I tested it with thunderbird.

Please raise the importance of this bug ASAP.
Comment 13 tony den haan 2015-10-12 10:02:54 UTC
I confirmed this issue over 2 years ago, reluctantly use thunderbird ever since. Is nobody using mail at all or something?
Comment 14 Keith Zubot-Gephart 2015-11-05 08:42:43 UTC
Running into this this week at work on Kubuntu 14.04 (KMail 4.13.3, Platform Version 4.13.3) ever since I set my two configured mail accounts (both IMAP, one a local server on the office network and one Gmail) to "Switch offline on Kmail Shutdown". 

Even though it shows me as online, if try and copy messages from a folder in one account to a folder in another, for example, or even just delte an email, it complains it can't do so in offline mode. I can toggle to offline and back and there's no change.

However, as soon as I toggle off the "Switch offline on Kmail Shutdown" option on the two accounts, everything acts fine again.
Comment 15 Médéric Boquien 2015-11-23 09:46:15 UTC
*** This bug has been confirmed by popular vote. ***
Comment 16 Denis Kurz 2016-09-24 18:00:44 UTC
This bug has only been reported for versions before 4.14, which have been unsupported for at least two years now. Can anyone tell if this bug still present?

If noone confirms this bug for a Framework-based version of kmail2 (version 5.0 or later, as part of KDE Applications 15.12 or later), it gets closed in about three months.
Comment 17 Denis Kurz 2017-01-07 22:07:43 UTC
Just as announced in my last comment, I close this bug. If you encounter it again in a recent version (at least 5.0 aka 15.08), please open a new one unless it already exists. Thank you for all your input.