mirror of https://github.com/apache/nifi.git
NIFI-2519 - ListenSMTP addresses mismatch between smtp.src attribute documentation and attribute.put
This commit is contained in:
parent
0ffdc2eb92
commit
e7288af859
|
@ -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")})
|
||||
|
|
|
@ -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));
|
||||
|
|
Loading…
Reference in New Issue