Github user olegz commented on a diff in the pull request:

    https://github.com/apache/nifi/pull/871#discussion_r75180197
  
    --- Diff: 
nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/main/java/org/apache/nifi/processors/email/smtp/SmtpConsumer.java
 ---
    @@ -149,7 +149,7 @@ public void done() {
             }
     
             attributes.put("smtp.helo", context.getHelo());
    -        attributes.put("smtp.remote.addr", 
context.getRemoteAddress().toString());
    +        attributes.put("smtp.src", 
context.getRemoteAddress().toString().substring(1));
    --- End diff --
    
    Not sure why we need ```substring(1)``` here? Both ```toString()``` and 
```substring(..)``` can cause exceptions (i.e., NPE and IndexArrayOutOfBound). 
    I'll put a null check and remove ```substring```. Basically if at some 
point any formatting would be required for the address we have processors that  
could do that down stream.


---
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.
---

Reply via email to