Bug 175988 - Yahoo "Authentication-Results" header break mail
Summary: Yahoo "Authentication-Results" header break mail
Status: RESOLVED FIXED
Alias: None
Product: kmail
Classification: Applications
Component: general (show other bugs)
Version: 1.10.3
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords: testcase, triaged
: 176408 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-11-24 15:35 UTC by Adrien Cordonnier
Modified: 2015-04-13 19:44 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Example of e-mail with corrupted header (1.88 KB, text/plain)
2008-11-24 15:41 UTC, Adrien Cordonnier
Details
E-mail from Kmail with corrupted header (4.54 KB, text/plain)
2008-11-28 22:19 UTC, Adrien Cordonnier
Details
Same e-mail but from Thunderbird (correct header) (4.53 KB, text/plain)
2008-11-28 22:20 UTC, Adrien Cordonnier
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Adrien Cordonnier 2008-11-24 15:35:31 UTC
Version:            (using KDE 4.1.3)
OS:                Linux
Installed from:    Ubuntu Packages

I get my e-mails from a Yahoo POP3 account. From time to time, one e-mail appears with unknown header datas: unknown date, unknown sender, etc. Yet this information is not lost but displayed in the message body and the message itselfg is quite unreadable because of base64 encoding.

From the different corrupted mails, it seems that the headers are cut in "Authentication-Results:" datas.

The mail seems not to be corrupted on the server as Kmail is set to let a copy on the server and the mails are displayed correctly with Thunderbird.
Comment 1 Adrien Cordonnier 2008-11-24 15:41:35 UTC
Created attachment 28795 [details]
Example of e-mail with corrupted header
Comment 2 Jaime Torres 2008-11-25 10:53:06 UTC
Somehow confirmed in svn trunk r888112, where after importing the test mail as an mbox, it does not appears at all in the mail lists, but is in the directory.
Comment 3 Thomas McGuire 2008-11-25 13:47:52 UTC
This mail is indeed corupted. The question is at wait point it became corrupted (i.e. if that was KMail's fault on an error of the Yahoo server).

Can you get a copy of that mail as it is on the server (maybe via Thunderbird) and attach it here?
Comment 4 Adrien Cordonnier 2008-11-28 22:19:31 UTC
Created attachment 28901 [details]
E-mail from Kmail with corrupted header
Comment 5 Adrien Cordonnier 2008-11-28 22:20:34 UTC
Created attachment 28902 [details]
Same e-mail but from Thunderbird (correct header)
Comment 6 Adrien Cordonnier 2008-11-28 22:40:34 UTC
Actually, the e-mail from Thunderbird (perfectly correct) is not displayed correctly when you open it with Kmail! The problematic lines are again:

E-mail from Thunderbird:
09: Authentication-Results: mta656.mail.mud.yahoo.com  from=insa-toulouse.fr; domainkeys=neutral (no sig)
10: ; from=insa-toulouse.fr; dkim=neutral  (no  sig)

Kmail think the message body starts from line 10. So it does not display correctly the message saved with Thunderbird. When Kmail itself receives the message from the server, it corrupts the header by inserting the following lines between the two previous lines:

E-mail from Kmail:
06: X-UID: 
07: Status: R
08: X-Status: N
09: X-KMail-EncryptionState:  
10: X-KMail-SignatureState:  
11: X-KMail-MDN-Sent:  
12:
Comment 7 Thomas McGuire 2008-11-29 15:09:28 UTC
*** Bug 176408 has been marked as a duplicate of this bug. ***
Comment 8 Thomas McGuire 2008-11-29 15:10:27 UTC
OK, I'll look at this soon.
Comment 9 Adrien Cordonnier 2009-02-19 17:54:42 UTC
Here is the process I did to correct my  corrupted mails:
1) Select all the corrupted mails (for example gathered in a subfolder) and export them in an mbox file. Pay attention if you forget some, it will be really hard to find which ones have been forgotten.
2) Open the mbox file with a text editor. Cut the lines between "X-UID:" and "X-KMail-MDN-Sent:" and remove any remaining line feeds or spaces at this place
3) Paste the lines after "X-Bogosity: ..."
4) Search for "From" to find where starts the next email and do 2 and 3 as necessary
5) Save the file and import it from Kmail (KmailCVT tool)
Comment 10 Daniel Ortmann 2009-02-19 18:50:13 UTC
Hello Adrien,

During the past month I have not seen many of these problems.  Maybe two total during the month.  The previous month was TERRIBLE and I received 2-8 per day.

My fixing technique is:
- Open ~/.kde/share/apps/kmail/mail/inbox/cur/ in emacs using dired with <Control> d
- <Control> x 3 to open windows side by side
- Press s to sort by date so the newest incoming files are at the top
- Go to the first file
- And for each file newer than some chosen time press <Control> o to view the file in the right most window.
- If the file is bad press o to edit it; when done return to the dired buffer
- Press <Control> n for the next file.
- At the end, press g to refresh the directory,
- Press ~ to mark the *~ files for deletion
- And x to delete them.

- Then return to the kmail inbox 
- Right click Rebuild Index
- Leave the inbox (go to drafts) and return.

- <Control> a to select all
- <Control> j to rerun all of your filters to categorize emails and drop them into their appropriate folders

- You will have to reset your flags manually, except for those which were set by your filters.
- And re-sort your mail by clicking the Date column


Anyway, that's my process.  Hope it helps.
Comment 11 Laurent Montel 2015-04-12 10:22:15 UTC
Thank you for taking the time to file a bug report.

KMail2 was released in 2011, and the entire code base went through significant changes. We are currently in the process of porting to Qt5 and KF5. It is unlikely that these bugs are still valid in KMail2.

We welcome you to try out KMail 2 with the KDE 4.14 release and give your feedback.
Comment 12 Adrien Cordonnier 2015-04-13 19:44:21 UTC
Tested with Kmail 4.14.1, the e-mail with the correct header and a POP3 server. The e-mail is now correctly displayed with opened locally. The email is also correctly retrieved and displayed when taken from a POP3 server. Bug marked as fixed.