Commit Graph
3 Commits
Author SHA1 Message Date
Martijn van de StreekandGitHub 64c07db5b0 Use logging to log parse errors (#19)
Use `logging` to log parse errors, replacing print()
2021-07-21 10:05:27 -04:00
Martijn van de StreekandGitHub 560a513349 Skip attachments without "__properties_version1.0" streams (#18)
We've found that messages with RTF formatting that contain embedded images
contain attachments without a "__properties_version1.0" stream.

As the current code is built around the "__properties_version1.0" stream,
these are skipped for now.

These image attachments do contain streams named "Ole" and "MailStream"
that should help with decoding/parsing in the future, but that's a bigger
project.
2021-07-21 10:03:19 -04:00
Martijn van de StreekandGitHub a057080bad Fix removing of Content-Type header from transport headers (#16)
The fourth argument to `re.sub` is `count`, but `re.I` (a flag) was passed
instead.

Because if this, messages with a lower-case "content-type" header would
never have their content-type header removed, leading to parse errors.

By explicity naming the parameter (`flags=`) to re.sub, the match
actually becomes case-insensitive.
2021-05-03 17:56:05 -04:00