sebbASF commented on issue #234: Bug: import/archive don't unfold headers before storage in ES URL: https://github.com/apache/incubator-ponymail/issues/234#issuecomment-576067724 When a line is folded, the MTA inserts CRLF followed by a single WSP; unfolding should be the reverse. Multiple WSP should be treated as a single WSP *when it separates tokens* The issue also affects Message-ID which can be wrapped within the value. Note that some MTAs may fold at 78 chars; some may fold at a longer line length. So the path that an email takes to the archiver may affect the raw layout. Potentially an email that is sent to multiple lists could travel by different routes to the lists and from the lists to the archiver. The headers (and body) may end up with different folds. Failure to unfold headers can also result in invalid Message-IDs being stored, for example: $ curl -s 'https://lists.apache.org/api/thread.lua?id=4b36027f9230b84f388d719e684536a910b53c304b2c2b05f5efe0fe@1135257469@%3Cusers.continuum.apache.org%3E' | python3 -m json.tool | fgrep message "message-id": "\n <0775dd7f2f88084aa05bcc79ef6f32532ea3a...@iblonce105.gb.ad.drkw.net>", $ curl -s 'https://lists.apache.org/api/thread.lua?id=01e80b71b223b176e0c8af1efeab5be229719e398669419d46d18f53@1078215889@<dev.cocoon.apache.org>' | python3 -m json.tool | fgrep message "message-id": "<c726734b5aca2445b2bb93e87add5033af3...@akxch03.tvnzad.tvnz.co.n\n\tz>",
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services