GitHub user sebbASF opened an issue:

    https://github.com/apache/incubator-ponymail/issues/234

    Bug: import/archive don't unfold headers before storage in ES

    The mail parser returns the headers as-is, including line-wraps.
    
    This is what is wanted for the raw email source, but is not really suitable 
for fields such as In-Reply-To, References etc.
    
    It seems there is no unfold method in the Python email or mailbox modules, 
so it looks like it is necessary to write one.
    
    Header values that have not been folded cannot contain CRLF, so unfolding 
should just be a matter of stripping these out.  There should be no need to 
check if the CRLF is followed by whitespace (assuming the folding has been done 
correctly).
    
    It might make sense to compress runs of WS to a single space in case there 
is some variation.
    This should make it easier to match things like In-Reply-To.

----

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to