[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kmail-devel
Subject:    Re: [PATCH] fix grave bug  69657
From:       Till Adam <till () adam-lilienthal ! de>
Date:       2003-12-06 10:18:58
[Download RAW message or body]

[Attachment #2 (multipart/signed)]


On Saturday 06 December 2003 01:43, Ingo Klöcker wrote:
> On Friday 05 December 2003 22:15, Till Adam wrote:
> > As Ingo suggested the attached patch checks for non-empty message id
> > duplicates only and double checks if the subject is the same as well.
> >
> > Please review.
>
> The proposed patch won't remove all duplicates AFAICS. Example:
> Message 1: Message-Id: a, Subject: a
> Message 2: Message-Id: a, Subject: a
> Message 3: Message-Id: a, Subject: b
> Message 4: Message-Id: a, Subject: b
>
> AFAICS Message 2 will be removed (as duplicate of Message 1), but
> Message 4 won't be removed.

That's true. 

> What about simply using (non-empty) msgIdMD5()+strippedSubjectMD5() as
> key for the idMD5s dictionary? Of course, the QStrings representing the
> MD5s have to have a fixed length to make this work properly.

It would probably be a good idea to re-write the duplicate check to use a hash 
computed over several fields, not just msg-id and subject, but also from and 
to, maybe. Not sure about date. It's rather arguable when two mails start or 
stop being duplicates of each other, but I guess one should avoid false 
positives at all cost. It's a bit like with spam, really, not an easy call to 
make. 

For now, the patch makes things a lot safer, which was my main concern. Feel 
free to add the improvement you propose above, if you have time, but I'd 
rather just get this in to get the bug fixed and re-think duplicate handling 
after 3.2. 

Till

[Attachment #5 (application/pgp-signature)]

_______________________________________________
KMail developers mailing list
KMail-devel@kde.org
https://mail.kde.org/mailman/listinfo/kmail-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic