Bug 294690 - Kmail/akonadi creates duplicate messages with slow IMAP connections
Summary: Kmail/akonadi creates duplicate messages with slow IMAP connections
Status: RESOLVED UNMAINTAINED
Alias: None
Product: kmail2
Classification: Applications
Component: general (show other bugs)
Version: 4.9.3
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-02-23 14:16 UTC by Telmo Xtra
Modified: 2015-09-24 12:17 UTC (History)
6 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 Telmo Xtra 2012-02-23 14:16:34 UTC
Version:           4.8 (using KDE 4.8.0) 
OS:                Linux

I'm using DAVmail for accessing my Exchange Server through the Internet.

Connection speed is slow.

Kmail/Akonadi reports connection to server lost and stops sync the current folder that he is syncing. It reconnects again, and starts from beginning of the folder where he was syncing.

Result: a lot of duplicated messages on the Kmail list and akonadi database. 

Final result: unusable.

Thunderbird works fine.

Reproducible: Always

Steps to Reproduce:
Have a Exchange Server.
Have Outlook web access.
Have a folder with some large number of messages and/or some big messages.
Use DavMail to connect to Exchange.
Configure Akonadi IMAP connector to connect to DavMail
Open Kmail
Error -> Imap_connection_X: Connection to server lost

Actual Results:  
Duplicated messages, a lot....

Unusable.

Expected Results:  
No duplicate messages.

Using the latest davmail software: http://davmail.sourceforge.net/

Korganizer works fine through davmail
Comment 1 rod260185 2012-07-20 02:31:35 UTC
I have the same problem with Gmail (DavServer). But only the new messages are duplicating (the program is creating an empty message duplicate from a normal message).
Comment 2 dombon45 2012-10-27 09:26:30 UTC
I have the same problem with two IMAP servers (imap.bbox.fr and mail.math.univ-toulouse.fr). I do not use davmail. Only new messages are duplicates (up to 2000 times), not only in kmail, but also on the servers.
I use Kmail 4.9.2 and akonadi-server 1.8.0 from kubuntu 12.10.
Comment 3 Sven Eden 2012-12-06 12:22:10 UTC
I can confirm this when using an old IMAP server at work. POP3 works flawlessly. But When a new message arrives on the IMAP server, it is received once, and then again every few seconds. all accompanied by a system notification:

----
"save failed. server replied BAD Error A0000XXX in IMAP command UID: invalid arguments"
----
with XXX raised by one with each duplication.

After some iterations the senders mail adress gets lost in the duplicates, then later the sending date.

To stop this I have to switch kmail to offline, log in via web interface (Horde Mail) and manually delete all but the original mail from the server.

Used here is KDE-4.9.3.

Btw.: I am the only one around here using kmail, and I am the only one having this problem. When I use the very same account with Thunderbird, no duplication ever happens.
Comment 4 Sven Eden 2012-12-07 10:21:01 UTC
I just have the duplication issue again. The message reads. (translated from german):
-----
The UID of the newly created message on the server can not be determined"
-----

The source of the mails are all equal except the following detail:

Every duplicate has the following lines preceding the original header:
-----
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on sed-notebook.havi.de
X-Spam-Status: No, score=0.0 required=5.0 tests=HTML_MESSAGE,T_DKIM_INVALID autolearn=ham version=3.3.2
X-Virus-Flag: no
X-Virus-Flag: no
-----
And every further copy has one additional line reading "X-Virus-Flag: no"

Further the Header items have no line breaks any more. As an example the field "Content-Type" changes from
-----
Content-Type: multipart/alternative;
	boundary="===============0431793831243792098=="
-----
to
-----
Content-Type: multipart/alternative; boundary="===============0431793831243792098=="
-----

I have no idea whether this is important. But I shall add that I used both ClamAV and SpamAssassin with Thunderbird, too, and did not see that problem.

(Thunderbird has other very serious problems, so it is no option any more.)
Comment 5 Sven Eden 2012-12-07 10:23:07 UTC
Sorry for the double post, but I didn't see this before and want to give as much detail as possible.

There is another change in the header of the duplicates. The first duplicate reads as above, but all that follow have a different second line:

-----
X-Spam-Status: No, score=0.0 required=5.0 tests=HTML_MESSAGE,T_DKIM_INVALID autolearn=unavailable version=3.3.2
-----

The change is from "autolearn=ham" to "autolearn=unavailable".
Comment 6 Martin Steigerwald 2015-09-11 19:35:10 UTC
Thank you Telmo and all the commenters for your report and comments.

It is about a version of KMail which uses Nepomuk and is unmaintained. Thus
closing. If you still see performance issues please open new reports. But
please follow the following guide lines to avoid unnecessary work for the
developers:

- Ideally test with KDEPIM and Akonadi 15.08. It contains some performance
improvements like the binary protocol.

- Otherwise at least use KDEPIM 4.14.10 and newest Akonadi 1.13 you can get as
it already contains some performance improvements.

- If you can wait, please retest with KDEPIM and Akonadi 15.12 once they become
available for you. Akonadi 15.12 will contain *massive* performance
improvements implemented by Dan due to new database indexes, optimized queries
and leveled file_db directory. All of these are in master already, so if you
dare use kdesrc-build to compile KF5, kdepim and kdepim-runtime. I am using
this currently and it basically moves the bottleneck to KMail (displaying message list
of huge folder). It is a *huge* improvement. And also Volker and Dan work to improve
message list display speed as well.

- Please also always report only one issue per report and check for duplicates before
reporting.

Thank you and greetings from KDE Randa Meetings,
Martin
Comment 7 René Krell 2015-09-24 11:48:40 UTC
The problem does still appear in Akonadi + KMail 15.08.1.
Comment 8 René Krell 2015-09-24 12:13:24 UTC
Isn't this a duplicate of https://bugs.kde.org/show_bug.cgi?id=294690 ?
Comment 9 René Krell 2015-09-24 12:17:18 UTC
Sorry, bad link in the comment above - isn't this a duplicate of https://bugs.kde.org/show_bug.cgi?id=283682