Skip to content

Python library for creating usable objects out of eml files.

License

Notifications You must be signed in to change notification settings

rapid7/python-eml-parser

Repository files navigation

InsightConnect Integrations Email Parser

pre-commit Code style: black Markdown Lint Unit testing

Tooling for parse emails in Rapid7 InsightConnect plugins.

Installation

pip install python-eml-parser

Use

Simple!

Python

from python-eml-parser.email_parser import EmailParser
from email import message_from_string


email_parser = EmailParser()
email = email_parser.make_email_from_raw(
    self.log, message_from_string(raw_email), mailbox_id
)

Contributions

Contributions are welcome! This project utilizes black and pre-commit for handling code style. Simply follow the instructions for installing pre-commit and run pre-commit install in the repository after cloning and you will be on your way to contributing!

Changelog

  • 2.0.1 - Adding in a default of empty string if there is no From section in an email
  • 2.0.0 - MD5, SHA1, and SHA256 Indicators for Base64 Content are now hashes of the decoded Base64 Content
  • 1.0.0 - Initial release