You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@james.apache.org by bt...@apache.org on 2020/12/21 07:29:33 UTC
[james-project] 08/17: JAMES-3431 DSNBounce should carry over
Original-Envelope-Id field
This is an automated email from the ASF dual-hosted git repository.
btellier pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/james-project.git
commit a728442a1016ce7fb2a64beda13174b7bb4826bf
Author: Benoit Tellier <bt...@linagora.com>
AuthorDate: Thu Dec 17 08:58:08 2020 +0700
JAMES-3431 DSNBounce should carry over Original-Envelope-Id field
---
.../src/main/java/org/apache/james/transport/mailets/DSNBounce.java | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/server/mailet/mailets/src/main/java/org/apache/james/transport/mailets/DSNBounce.java b/server/mailet/mailets/src/main/java/org/apache/james/transport/mailets/DSNBounce.java
index 1c247b1..081caa3 100755
--- a/server/mailet/mailets/src/main/java/org/apache/james/transport/mailets/DSNBounce.java
+++ b/server/mailet/mailets/src/main/java/org/apache/james/transport/mailets/DSNBounce.java
@@ -453,6 +453,12 @@ public class DSNBounce extends GenericMailet implements RedirectNotify {
buffer.append("Received-From-MTA: dns; " + originalMail.getRemoteHost())
.append(LINE_BREAK);
+ originalMail.dsnParameters()
+ .flatMap(DsnParameters::getEnvIdParameter)
+ .ifPresent(envId -> buffer.append("Original-Envelope-Id: ")
+ .append(envId.asString())
+ .append(LINE_BREAK));
+
for (MailAddress rec : originalMail.getRecipients()) {
appendRecipient(buffer, rec, getDeliveryError(originalMail), originalMail.getLastUpdated());
}
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org