Came across a few mails which aren't RFC compliant
authentication-results: spf=none (sender IP is ) smtp.mailfrom=**@********.**;
Content-Type: multipart/related;
boundary="_004_2039b206f2a54788ba6a101978bd3f82DBXPR07MB013eurprd07pro_";
type="multipart/alternative"
MIME-Version: 1.0
For example, the mail above has a blank line in the header (before Content-Type). Libraries which strictly abide by RFC (for example https://github.com/mikel/mail), won;t be able to parse them. Apple Mail, Thunderbird do manage to handle such mails.
Have tried to browse through Thunderbird's codebase, being unfamiliar with C++, I just managed to find https://github.com/mozilla/releases-comm-central/blob/1f2a40ec2adb448043de0ae96d93b44a9bfefcd1/mailnews/mime/src/mimemsg.cpp
Can someone point me to the part of the Thunderbird's codebase where mail parsing happens, or any opensource libraries/apps which handle such non complaint mails.
EDIT:
Hexdump of the blank line. It contains a space.
00013e0: 2a2a 2a2a 2a2a 2e2a 2a3b 0d0a 200d 0a43 ******.**;.. ..C
00013f0: 6f6e 7465 6e74 2d54 7970 653a 206d 756c ontent-Type: mul
0001400: 7469 7061 7274 2f72 656c 6174 6564 3b0d tipart/related;.