-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
first version of the mail plugin #3
base: main
Are you sure you want to change the base?
Conversation
@Sebastian-Maier can you please do a first review? |
Hi Phill93, thank you for all your efforts. 🙂 I just assigned issue #1 to you. I hope this is ok? You already listed most of the potential improvements:
Apart from that, I found the following minor things:
I like your regex-/JSON-based parser solution – it's certainly more than sufficient for a first version of the mail parser and, at the same time, way more flexible than the hardcoded parser we use for the SMS source. For the (rather simple) SMS parser, we currently have the following requirements:
Are there reasons against ttp (or a comparable template-based parser) apart from the additional Python dependency? |
Hi Sebastian, I added your points to my ToDo in the first post. I spent half of Sunday with ttp and then hacked the regex solution together in the evening. ttp has a few problems capturing multiline text. For a clean result we will use a mix of ttp or regex templates and python scripts. It would be good to have example emails from other control centers, not sure how similar they are. I don't know another parser than ttp for python, I use ttp professionally for network automation. Greetings Phill93 |
Thank you for looking into ttp. The remaining question is, how to structure the parser implementations to allow for code reuse/sharing (in order to keep the effort for the parser creation/maintenance as small as possible). Regarding mails from other control centers: Maybe @noffycws can provide you with (anonymized) mail examples? |
This allows us to access attachments and non-text emails in the parser.
This is a draft please do not merge!
Plugin to receive and parse emails.
Unread mails are retrieved from the server using IMAP and parsed using regexes.
Todo:
CAUSE_UNPARSABLE_MESSAGE
AppInfo.path