Repository: nifi
Updated Branches:
  refs/heads/master 0ffdc2eb9 -> a0fab15eb


NIFI-2519 - ListenSMTP addresses mismatch between smtp.src attribute 
documentation and attribute.put


Project: http://git-wip-us.apache.org/repos/asf/nifi/repo
Commit: http://git-wip-us.apache.org/repos/asf/nifi/commit/e7288af8
Tree: http://git-wip-us.apache.org/repos/asf/nifi/tree/e7288af8
Diff: http://git-wip-us.apache.org/repos/asf/nifi/diff/e7288af8

Branch: refs/heads/master
Commit: e7288af859d00d6a4d12631d73a92404e31ba7f4
Parents: 0ffdc2e
Author: Andre F de Miranda <[email protected]>
Authored: Tue Aug 16 09:13:39 2016 +1000
Committer: Oleg Zhurakousky <[email protected]>
Committed: Wed Aug 17 14:58:02 2016 -0400

----------------------------------------------------------------------
 .../src/main/java/org/apache/nifi/processors/email/ListenSMTP.java | 2 +-
 .../java/org/apache/nifi/processors/email/smtp/SmtpConsumer.java   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/nifi/blob/e7288af8/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/main/java/org/apache/nifi/processors/email/ListenSMTP.java
----------------------------------------------------------------------
diff --git 
a/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/main/java/org/apache/nifi/processors/email/ListenSMTP.java
 
b/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/main/java/org/apache/nifi/processors/email/ListenSMTP.java
index 760db13..9e422ca 100644
--- 
a/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/main/java/org/apache/nifi/processors/email/ListenSMTP.java
+++ 
b/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/main/java/org/apache/nifi/processors/email/ListenSMTP.java
@@ -71,7 +71,7 @@ import org.subethamail.smtp.server.SMTPServer;
             + "certificates used by an TLS peer"),
     @WritesAttribute(attribute = "smtp.certificates.*.principal", description 
= "The principal for each of the "
             + "certificates used by an TLS peer"),
-    @WritesAttribute(attribute = "smtp.src", description = "The source IP of 
the SMTP connection"),
+    @WritesAttribute(attribute = "smtp.src", description = "The source IP and 
port of the SMTP connection"),
     @WritesAttribute(attribute = "smtp.from", description = "The value used 
during MAIL FROM (i.e. envelope)"),
     @WritesAttribute(attribute = "smtp.recipient.*", description = "The values 
used during RCPT TO (i.e. envelope)"),
     @WritesAttribute(attribute = "mime.type", description = "Mime type of the 
message")})

http://git-wip-us.apache.org/repos/asf/nifi/blob/e7288af8/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/main/java/org/apache/nifi/processors/email/smtp/SmtpConsumer.java
----------------------------------------------------------------------
diff --git 
a/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/main/java/org/apache/nifi/processors/email/smtp/SmtpConsumer.java
 
b/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/main/java/org/apache/nifi/processors/email/smtp/SmtpConsumer.java
index 4dad3bc..a6d7b33 100644
--- 
a/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/main/java/org/apache/nifi/processors/email/smtp/SmtpConsumer.java
+++ 
b/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 class SmtpConsumer implements MessageHandler {
         }
 
         attributes.put("smtp.helo", context.getHelo());
-        attributes.put("smtp.remote.addr", 
context.getRemoteAddress().toString());
+        attributes.put("smtp.src", 
context.getRemoteAddress().toString().substring(1));
         attributes.put("smtp.from", from);
         for (int i = 0; i < recipientList.size(); i++) {
             attributes.put("smtp.recipient." + i, recipientList.get(i));

Reply via email to