Bug 474538 - The EWS fetched mails are frequently corrupted
Summary: The EWS fetched mails are frequently corrupted
Status: REPORTED
Alias: None
Product: kmail2
Classification: Applications
Component: message list (show other bugs)
Version: 5.24.1
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-09-15 08:21 UTC by Cyrille Dunant
Modified: 2023-11-16 06:56 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 Cyrille Dunant 2023-09-15 08:21:31 UTC
SUMMARY
The EWS fetched mails are frequently corrupted: the mail itself and its content are fine, but the show up as (No Subject) with a date of October -4714. When the cache is deleted and the mails refetched they are listed correctly.

STEPS TO REPRODUCE
1. Let the EWS agent run normally

OBSERVED RESULT

Mails are frequently misclassified as having no subject, unknown sender and a strange date. purging the cache and relaunching fixes it, but it is very irritating as it happens for a good fraction of the mails requiring frequent restarts

EXPECTED RESULT

sender subject and date should be reported correctly.

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION
Comment 1 Antonio Rojas 2023-09-15 08:54:33 UTC
Can confirm the issue, but I think it is actually Kmail's problem, not akonadi. The email details show fine in the notification popup, and also in the headers inside the mail viewer. The issue is in in kmail's email list, looks like the email is inserted in the list before all details are retrieved. Simply restarting kmail (without restarting akonadi or cleaning the cache) fixes this for me.
Comment 2 Cyrille Dunant 2023-09-15 08:57:01 UTC
(In reply to Antonio Rojas from comment #1)
> Can confirm the issue, but I think it is actually Kmail's problem, not
> akonadi. The email details show fine in the notification popup, and also in
> the headers inside the mail viewer. The issue is in in kmail's email list,
> looks like the email is inserted in the list before all details are
> retrieved. Simply restarting kmail (without restarting akonadi or cleaning
> the cache) fixes this for me.

I will try this. I thought I already had. could it be linked with the headers' display then?
Comment 3 Cyrille Dunant 2023-09-15 14:07:36 UTC
(In reply to Antonio Rojas from comment #1)
> Can confirm the issue, but I think it is actually Kmail's problem, not
> akonadi. The email details show fine in the notification popup, and also in
> the headers inside the mail viewer. The issue is in in kmail's email list,
> looks like the email is inserted in the list before all details are
> retrieved. Simply restarting kmail (without restarting akonadi or cleaning
> the cache) fixes this for me.

I can confirm this is related to kmail. Restarting indeed clears the display issue. I've changed the product.
Comment 4 Carl Schwan 2023-09-27 10:49:18 UTC
Antonio Rojas are you also using EWS?

I never encountered this issue with IMAP and looking at the responsible code in messagelib, it seems kmail is able to fetch a valid Akonadi::Item from akonadi and the item contains a KMime::Message::Ptr but the KMime::Message is completely empty which is the issue here.
Comment 5 Antonio Rojas 2023-09-27 11:49:11 UTC
(In reply to Carl Schwan from comment #4)
> Antonio Rojas are you also using EWS?

Yes, this is specific to the EWS accout. I have never seen this on IMAP in the  15+ years I've been using Kmail.
Comment 6 Cyrille Dunant 2023-09-27 11:50:11 UTC
(In reply to Antonio Rojas from comment #5)
> (In reply to Carl Schwan from comment #4)
> > Antonio Rojas are you also using EWS?
> 
> Yes, this is specific to the EWS accout. I have never seen this on IMAP in
> the  15+ years I've been using Kmail.

Same for me
Comment 7 Pierluigi Frullani 2023-11-16 06:56:04 UTC
I have the same problem.
I'm using Kmail since the beggining and never had such problem neither with imap/pop and their counterpart in ssl.
Moreover the account that trigger the problem was in Imap and had no problem, but then Microsoft decided to remove the access in Imap and had to convert. Now I have the probem.