Bug 290882 - "connection to server lost" on new email
Summary: "connection to server lost" on new email
Status: RESOLVED WORKSFORME
Alias: None
Product: Akonadi
Classification: Frameworks and Libraries
Component: IMAP resource (show other bugs)
Version: 4.7
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: Christian Mollekopf
URL:
Keywords: triaged
Depends on:
Blocks:
 
Reported: 2012-01-07 14:42 UTC by Bernd Buschinski
Modified: 2018-10-27 04:08 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Bernd Buschinski 2012-01-07 14:42:24 UTC
Version:           4.7 (using KDE 4.7.4) 
OS:                Linux

akonadi/kmail losses connection on new email.
There must be a valid connection as kmail notices that I got a new email, but seems to loose it while trying to fetch it, no new email appears in kmail.
This only happens if kmail/akonadi is already running for some time, right after start everything is fine.

Reproducible: Sometimes

Steps to Reproduce:
Start kmail with an imap account
- wait some time, more than 10min
- send yourself an email, via website, not via kmail

Actual Results:  
kmail/akonadi noticed you have a new email and a notification pops up
"Connection to server lost."

Expected Results:  
I should receive the email just fine

Nothing noticeable in akonadiconsole debugger in the upper windows,
In the down window the there is just
"AgentBase(akonadi_imap_resource_1): Connection to server lost."
Comment 1 Kevin Ottens 2012-02-10 18:16:08 UTC
OK, we'll need more info for this one if it shows up again. Please see:
http://techbase.kde.org/Projects/PIM/Akonadi/Debug_IMAP
Comment 2 Bernd Buschinski 2012-02-10 19:32:53 UTC
using KIMAP_LOGFILE I only got something new in /tmp/imap.log.30599.3

C: A000046 EXPUNGE
X


Important Note: I disabled interval check, as it is not needed imap, imap should notifiy on new email (like it does). This used to work in older kmail2 version, like in kmail2, kde 4.6 (but now sure about the exact version)
Comment 3 Bernd Buschinski 2012-02-14 14:42:02 UTC
I have no clue what more information I could give you. Please state more specific questions, I will answer them as soon as possible.


and it also happens with
Qt: 4.8.0
KDE: 4.8.00
Comment 4 Kevin Ottens 2012-02-14 21:31:23 UTC
Hmmm... very weird. From the extract you posted it looks like the problem is not on our side, but on the side of the server. You issue a command just fine but then the connexion is closed, not really anything we can do about it if the server drops us.

Which server is that?

Also maybe double check in the log you should have a SELECT command shortly before the EXPUNGE, is it applied on a mailbox which exists? A bad SELECT could be a reason for the server to drop us although that'd be overly aggressive.
Comment 5 Bernd Buschinski 2012-02-15 21:31:53 UTC
Its googles imap server, imap.googlemail.com

I tested again WITH interval check enabled, and it works fine.


WITHOUT interval check it still fails, I watched more closely and here is the result...

in .1 file
S: A000005 OK 73 good day ( Success 
nothing new after getting email


in .2 file
S: * 1133 EXISTS < lots of them, with the same number
and after getting new email
S: * 1134 EXISTS


in .3 file
S: * 1133 FETCH ( UID 1621 FLAGS (\Seen) ) < lots of them, with different numbers
S: A000040 OK Success
and after getting new email
C: A000041 EXPUNGE
X

but no select statement in the time of getting the email.

And again (for .3) without interval check and I had kontact running for ~2h without any email traffic. So the last message to new message (new after mail) was 2h later. Nothing between it.
Comment 6 Kevin Ottens 2012-02-17 16:40:04 UTC
This one is really weird... From your description I don't really understand what's going on. Apparently it is the google imap server just closing the connection on us, if it doesn't report a reason there's nothing I can do unfortunately... :-/

Just out of curiosity, the other sessions don't drop, right?
Also what's the command we sent before the EXPUNGE? (look for a line starting with "C: A000040" in the same file) And the command again before that (would be A00039)?

Also, how much time between the "S: A000040 OK Success" and our sending of A000041?

I still feel like poking in the dark on that one.
Comment 7 sourcemaker 2012-12-09 13:10:35 UTC
I have the same problem using KMail 4.9.4 and GMail over IMAP.
I don't know why, but in other mail clients IDLE IMAP works fine with GMail

My current workaround is to set the mail checking interval to 15 minutes.
Will this issue been fixed in the next kde release?
Comment 8 km 2013-03-15 11:30:26 UTC
Still present in 4.10 (alsa with gmail/imap).
Comment 9 Kevin Ottens 2013-11-16 07:30:59 UTC
The IMAP resource has a new maintainer, reassigning to him.
Comment 10 Andrew Crouthamel 2018-09-25 03:44:26 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least 15 days. Please provide the requested information as soon as possible and set the bug status as REPORTED. Due to regular bug tracker maintenance, if the bug is still in NEEDSINFO status with no change in 30 days, the bug will be closed as RESOLVED > WORKSFORME due to lack of needed information.

For more information about our bug triaging procedures please read the wiki located here: https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please set the bug status as REPORTED so that the KDE team knows that the bug is ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 11 Andrew Crouthamel 2018-10-27 04:08:29 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least 30 days. The bug is now closed as RESOLVED > WORKSFORME due to lack of needed information.

For more information about our bug triaging procedures please read the wiki located here: https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!