Office 365 journaling messages header not parsed correctly

Issue #1141 closed
Matyas created an issue

For Office 365 journaling messages:

Symptoms:

In Web UI lower view pane headers are empty.

Message contains the journaling headers.

Message download eml file starts like this:

Content-Transfer-Encoding: binary

From: Firstname Lastname xynx@xyz.com
To: Firstname Lastname xyx@xyz.com
Subject: Test
Thread-Topic: Test
Thread-Index: Adb5N4+dBQkQxorrQRys+KdNvtsSgA==
Date: Tue, 2 Feb 2021 07:46:59 +0000
Message-ID: VI1PR04MB4734082D78AA3FDCE6AD401C94B59@VI1PR04MB4734.eurprd04.prod.outlook.com

Cause:

removeJournal function in mime.php does not work properly because in the original message is like this:

Content-Type: message/rfc822
Content-Transfer-Encoding: binary

From: …

and thec urrent code expects that “message/rfc822” to be followed by newline an not Content-Transfer…

A quick fix I tried was to replace “message/rfc822” in the removeJournal with “Encoding: binary” and it works but I’m not sure it covers all the cases.

Many thanks.

Comments (7)

  1. Matyas reporter

    I attached a such a message. It is complete including full headers only some of the IP addresses and emails/domains have been edited for data protection.

  2. Janos SUTO repo owner

    What piler version is this? I’ve sent the attachment to the test environment (running 1.3.10), and it showed the email content properly.

  3. Matyas reporter

    The version is piler-1.3.5-f2e4cb1.el7.x86_64. No difference with the latest mime.php from the repo.

    The “Content-Transfer-Encoding: binary” ;ine which folllows the “Content-Type: message/rfc822” makes removeJournal to retun the $message starting with Content-Transfer-Encoding: binary followed by an empty line. Normally the resulting $message should start with From: header.

  4. Janos SUTO repo owner

    I believe that there might be some difference. I’d like you to get the latest master branch, and try it with its gui as well.

  5. Log in to comment