You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@james.apache.org by GitBox <gi...@apache.org> on 2021/05/20 05:14:40 UTC

[GitHub] [james-project] chibenwa opened a new pull request #443: JAMES-3588 MailetContainer error handling: allow error propagation

chibenwa opened a new pull request #443:
URL: https://github.com/apache/james-project/pull/443


   Base use case: Executing the mailet container with LMTP I want to escalate some failures to the LMTP client
   
   Nice bonus: It enables better error management eg by propagating exception upon mail processor we can trigger a nack and prevent message loss.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org


[GitHub] [james-project] Arsnael commented on a change in pull request #443: JAMES-3588 MailetContainer error handling: allow error propagation

Posted by GitBox <gi...@apache.org>.
Arsnael commented on a change in pull request #443:
URL: https://github.com/apache/james-project/pull/443#discussion_r635964199



##########
File path: server/protocols/protocols-lmtp/src/main/java/org/apache/james/lmtpserver/MailetContainerHandler.java
##########
@@ -81,4 +130,28 @@ protected Response processExtensions(SMTPSession session, Mail mail) {
                     .collect(Guavate.toImmutableList()));
         }
     }
+
+    private LMTPMultiResponse executeEachRecipientSeparately(Mail mail, Collection<MailAddress> recipients) {
+        return LMTPMultiResponse.of(
+            recipients.stream()
+                .map(recipient -> executeFor(mail, recipient))
+                .collect(Guavate.toImmutableList()));
+    }
+
+    private SMTPResponse executeFor(Mail mail, MailAddress recipient) {
+        try {
+             Mail newMail = mail.duplicate();

Review comment:
       indent




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org


[GitHub] [james-project] chibenwa merged pull request #443: JAMES-3588 MailetContainer error handling: allow error propagation

Posted by GitBox <gi...@apache.org>.
chibenwa merged pull request #443:
URL: https://github.com/apache/james-project/pull/443


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org