Github user kevdoran commented on a diff in the pull request: https://github.com/apache/nifi/pull/2111#discussion_r136448958 --- Diff: nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/main/java/org/apache/nifi/processors/email/ExtractEmailAttachments.java --- @@ -131,11 +132,15 @@ public void process(final InputStream rawIn) throws IOException { MimeMessageParser parser = new MimeMessageParser(originalMessage).parse(); // RFC-2822 determines that a message must have a "From:" header // if a message lacks the field, it is flagged as invalid - Address[] from = originalMessage.getFrom(); + if (InternetAddress.parseHeader(originalMessage.getHeader("From", ","), false) == null) { + if (InternetAddress.parseHeader(originalMessage.getHeader("Sender", ","), false) == null) { --- End diff -- Do you think falling back to "Sender" if "From" is not present for RFC validation is desired behavior? According to RFC-2882, and the RFCs that update it ([RFC-5322](https://tools.ietf.org/html/rfc5322), [RFC-6854](https://tools.ietf.org/html/rfc6854)), the "Sender" field should only be present if "From" is also present. That said, @btwood, have you encountered email servers that use "Sender" without "From"? If so, it might be worth considering adjusting the implementation here to reflect what is likely to be encountered in the wild vs. strict RFC specification.
--- 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 infrastruct...@apache.org or file a JIRA ticket with INFRA. ---