Is there a way to connect to an email account, download all emails, retrieve all the attachment files that are XML, then parse the XML and have the XML data populate the fields and discard the attachment?
I tried using the imap plugin on the input, but I don't see the attachment anywhere on the log that comes out on the output, even if the attachment is a simple text file with one character.
I've seen articles saying elasticsearch has an "attachment" type that can be configured, so I imagine logstash has a way to retrieve and send attachments to elasticsearch. But this is not my end goal, I want to retrieve the XML file and parse it with the filter and only output the XML fields individually.
I also know that there is a XML plugin for the filter, so I know parsing the XML should be possible also once I have the file.
I need this to work with DMARC reports. DMARC reports are thousands of emails that are received with an XML attachment.
"I figured out how to extract the XML data from the email, now I'm looking into parsing the XML with the XML filter.
I've tried removing the initial header <?xml version=\"1.0\" encoding=\"UTF-8\" ?>, but still can't parse the XML as fields and values.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.