Bug 246257 - deletion of mails doesn't work, deleted mails reappear
Summary: deletion of mails doesn't work, deleted mails reappear
Status: RESOLVED FIXED
Alias: None
Product: kmail2
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Debian unstable Linux
: NOR major
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-07-30 12:39 UTC by Ludwig Reiter
Modified: 2012-12-08 16:36 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Full query result. (17.38 KB, text/plain)
2010-08-25 17:28 UTC, Christophe Marin
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ludwig Reiter 2010-07-30 12:39:06 UTC
Version:           unspecified (using Devel) 
OS:                Linux

Version: 4.5.e5.20100723.1154920-kk3.1154888 (enterprise5)

Reproducible: Always

Steps to Reproduce:
1. Send three mails to my account.
2. Wait a moment.
3. Manually sync.
=> With luck all three mails are displayed.
4. Delete all mails.

Actual Results:  
The mails are moved to trashcan, but some of them reappear in the inbox.

Expected Results:  
These deleted mails shouldn't reappear in the inbox.
Comment 1 Volker Krause 2010-08-02 09:07:09 UTC
This has been fixed some time ago already.
Comment 2 Christophe Marin 2010-08-19 23:25:00 UTC
Reopen. The issue still exists in kmail2 from trunk (r1165650)
Comment 3 Christophe Marin 2010-08-25 17:25:18 UTC
Some tests result with a fresh akonadi setup and a DIMAP account.

I've checked the database state before deleting the message, just after and finally after manually checking the messages in KMail.

The Query I used is:

SELECT pimitemtable.id, pimitemtable.rev, pimitemtable.remoteId,flagtable.name, pimitemtable.remoteRevision, collectiontable.name, mimetypetable.name, pimitemtable.dirty, pimitemtable.size FROM pimitemtable LEFT JOIN collectiontable ON collectiontable.id = pimitemtable.collectionId LEFT JOIN mimetypetable ON pimitemtable.mimeTypeId = mimetypetable.id LEFT JOIN pimitemflagrelation ON pimitemtable.id=pimitemflagrelation.PimItem_id LEFT JOIN flagtable ON pimitemflagrelation.Flag_id= flagtable.id ORDER BY pimitemtable.id

The full output is in the attached file, here's the result for the message I played with.


1/ The messages were downloaded:

| 20 |   0 | 43360    | \Seen     | NULL           | INBOX | message/rfc822 |     0 |    7891 |

2/ In KMail, the corresponding message is deleted:

| 20 |   1 | {963bdc29-9b5f-463e-ae30-995c9b76bb85} | \Seen     | NULL           | trash | message/rfc822 |     0 |    7891 |

3/ After a manual check:

| 20 |   1 | {963bdc29-9b5f-463e-ae30-995c9b76bb85} | \Seen     | NULL           | trash | message/rfc822 |     0 |    7891 |
| 47 |   1 | 43360                                  | \DELETED  | NULL           | INBOX | message/rfc822 |     0 |    7891 |
| 47 |   1 | 43360                                  | \SEEN     | NULL           | INBOX | message/rfc822 |     0 |    7891 |

At this point, I have a copy in the trash folder for the local maildir resource *AND* the message is also in the INBOX folder but greyed.

If I manually remove the \DELETED flag from the database, I can click this message again.
Comment 4 Christophe Marin 2010-08-25 17:28:37 UTC
Created attachment 50947 [details]
Full query result.

Full output.
Comment 5 Volker Krause 2010-08-28 13:20:19 UTC
As discussed on IRC, this was caused by auto-expunge being disabled (in which case mails are not automatically removed from IMAP, just marked as deleted, as intended).
Comment 6 Thomas Arend 2012-12-08 16:32:24 UTC
I can#t confirm that this in fixed.

I updated to 4.9.4 today.

I deleted all messages in a folder and clicked on "Nach E-Mail sehen" just a second later. The deleted messages reappear in the folder. 

This "trick" was reproducible with the messages multiple times.
Comment 7 Thomas Arend 2012-12-08 16:36:01 UTC
(In reply to comment #6)
> I can#t confirm that this in fixed.
> 
> I updated to 4.9.4 today.
> 
> I deleted all messages in a folder and clicked on "Nach E-Mail sehen" just a
> second later. The deleted messages reappear in the folder. 
> 
> This "trick" was reproducible with the messages multiple times.

Additional information:

I have 4 to 6 copies of the mail in the trashcan.