Bug 230072 - pop3: mails are often not deleted on the server (web.de) -> I get many duplicate messages
Summary: pop3: mails are often not deleted on the server (web.de) -> I get many duplic...
Status: RESOLVED FIXED
Alias: None
Product: kmail
Classification: Unmaintained
Component: pop3 (show other bugs)
Version: 1.13.1
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
: 230390 232245 234832 238800 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-03-09 10:31 UTC by Arne Babenhauserheide
Modified: 2010-10-31 13:53 UTC (History)
9 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
POP3 Mail session, one with error next is OK. Also patch for my debug hacks. (6.31 KB, application/x-compressed-tar)
2010-07-07 15:50 UTC, sven-ola
Details
Fix for POP3 ioslave buffer handling (28.64 KB, patch)
2010-07-16 15:37 UTC, sven-ola
Details
Fix for POP3 ioslave buffer handling (the correct one) (758 bytes, patch)
2010-07-16 15:57 UTC, sven-ola
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Arne Babenhauserheide 2010-03-09 10:31:29 UTC
Version:           1.13.1 (using 4.4.1 (KDE 4.4.1), Gentoo)
Compiler:          x86_64-pc-linux-gnu-gcc
OS:                Linux (x86_64) release 2.6.31-gentoo-r6

I currently get about 1 to 5 copies of each mail, one more every time I check for new mail, until at some point I couldn't yet determine the mails are really deleted. 

I use pop3 and "don't keep on server" with pop3.web.de, but the messages get downloaded again and again, making my inbox quite unreadable.
Comment 1 Björn Ruberg 2010-03-13 18:13:40 UTC
*** Bug 230390 has been marked as a duplicate of this bug. ***
Comment 2 Michael Schuerig 2010-03-14 00:58:56 UTC
After some more time, I have the vague impression that this problem tends to appear, when the computer is working heavily. Specifically, the Nepomuk Strigi File Indexer seems to cause or exacerbate a system state where the problem is more likely to occur.

The immediate cause I can think of is that some process, such as strigi, consumes so much CPU or IO bandwidth that POP3 operations time out or otherwise don't execute properly.
Comment 3 Kevin Funk 2010-06-28 12:07:36 UTC
Any updates on this? Tbh, I also think that this bug depends on system load.
Comment 4 sven-ola 2010-07-07 15:50:33 UTC
Created attachment 48654 [details]
POP3 Mail session, one with error next is OK. Also patch for my debug hacks.
Comment 5 sven-ola 2010-07-07 15:51:44 UTC
Hey,

bug also shows up on Kubuntu/Lynx (1.13.2), "Leave mail on server", Sometimes got "Invalid response from server", sometimes not. Have added some fprintf() to pop3.cpp in the pop3 KIO-Slave. Probably an error in the myReadLine() function. 

I'll attached (see above) the outcome of my fprintf's together with a source diff and snarfed pop3 sessions using tcpflow for investigation. 

May be a duplicate of these:
https://bugs.kde.org/show_bug.cgi?id=232245
https://bugs.kde.org/show_bug.cgi?id=238800
https://bugs.kde.org/show_bug.cgi?id=242933
Comment 6 sven-ola 2010-07-16 15:34:21 UTC
Needed a bit, because sometimes anything work. The culprit seems to be overlapping-buffer-mixing-by-memcpy. I'll attach a patch that should fix the POP3 kioslave.

Signed-off-by: Sven-Ola Tuecke <sven-ola-aet-gmx.de>
Comment 7 sven-ola 2010-07-16 15:37:30 UTC
Created attachment 49229 [details]
Fix for POP3 ioslave buffer handling 

Signed-off-by: Sven-Ola Tuecke <sven-ola-aet.gmx.de>
Comment 8 sven-ola 2010-07-16 15:57:05 UTC
Created attachment 49236 [details]
Fix for POP3 ioslave buffer handling (the correct one)

Signed-of-By: Sven-Ola
Comment 9 Thomas McGuire 2010-07-30 00:00:16 UTC
*** Bug 232245 has been marked as a duplicate of this bug. ***
Comment 10 Thomas McGuire 2010-07-30 00:07:28 UTC
SVN commit 1156867 by tmcguire:

Fix POP3 mailcheck aborting because of internal memory errors.

We were using memcpy() with overlapping memory regions, which does not
work. Now, use memmove().

Thanks to Sven-Ola Tuecke <sven-ola at gmx dot de> for finding and
fixing this problem!

BUG: 230072

 M  +2 -2      pop3.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1156867
Comment 11 Arne Babenhauserheide 2010-07-30 15:26:00 UTC
will the fix be backported into current kdepim, or will it go only into 4.5.1?
Comment 12 Kevin Funk 2010-07-30 15:52:15 UTC
@Arne, this patch was applied to the 4.5 branch, and merged to current trunk.

Thanks for fixing this, Thomas
Comment 13 Ian Powell 2010-08-11 20:03:57 UTC
Kmail does not retrieve all emails from my POP3 mailboxes, it replaces a lost
email with a dummy email with strange content.  Between the "===" lines is a
copy of the content of the strange email substitute.
==============================
Status: R
 X-Status: N
 X-KMail-EncryptionState: 
 X-KMail-SignatureState: 
 X-KMail-MDN-Sent: 

Subject: 
Date: Sunday 07 Feb 2106
From: 
To: 

1 UID35-1224801402
2 UID36-1224801402
3 UID37-1224801402
=======================================

The "lost" email remains on the ISP mailbox as "read".  If i set it back to
unread Kmail still will not get it.
reported on bug 245943 - happens on kmail 1.13.5
Comment 14 Kevin Funk 2010-09-07 09:53:59 UTC
*** Bug 234832 has been marked as a duplicate of this bug. ***
Comment 15 Kevin Funk 2010-09-07 09:55:12 UTC
*** Bug 238800 has been marked as a duplicate of this bug. ***
Comment 16 Ian Powell 2010-09-08 00:25:03 UTC
On Tuesday 07 September 2010 08:54:02 Kevin Funk wrote:
> https://bugs.kde.org/show_bug.cgi?id=230072
> 
> 
> Kevin Funk <krf@electrostorm.net> changed:
> 
>            What    |Removed                     |Added
> ---------------------------------------------------------------------------
> - CC|                            |philschmidt@gmx.net
> 
> 
> 
> 
> --- Comment #14 from Kevin Funk <krf electrostorm net>  2010-09-07 09:53:59
> --- *** Bug 234832 has been marked as a duplicate of this bug. ***
Thats unfortunate.  Ingo told me that the kmail team is too small to 
check/deal with the bug list so it may take a long time before its looked at.  
I've got a major bug in the list where it does not even retrieve the emails, 
it gives me a weird email instead of the actual email.
Patience is your friend

regards

Ian
Comment 17 Arne Babenhauserheide 2010-10-31 13:53:30 UTC
I get no more duplicate emails since the last update. Many thanks!