Benoit Tellier created JAMES-2912:
-------------------------------------

             Summary: RemoteDelivery: add a onSuccessProcessor
                 Key: JAMES-2912
                 URL: https://issues.apache.org/jira/browse/JAMES-2912
             Project: James Server
          Issue Type: New Feature
          Components: Matchers/Mailets (bundled), Remote Delivery
            Reporter: Benoit Tellier


Currently remote delivery allows to customize a mail handling upon error via 
the `bounceProcessor` that gets executed upon final failure.

We should also allow a user to customize handling of a remote delivered mail 
success. I propose to do it via execution of a `onSuccessProcessor` property to 
allow further mailet execution on remote delivered emails.

Adding the configuration option in RemoteDeliverConfiguration and handling the 
fully succeeded case in DeliveryRunnable is easy, however current  
implementation of MailDelivrer do enforce some harmful "hardcoded" behaviour 
upon partial delivery failures: bouncer might get called directly, and 
succeeded recipients are dropped silently. I believe that a quality 
implementation will return a list of results (result including mail addresses) 
so that DeliveryRunnable can enforce all success/failure policies.

Integration tests for this feature should of course be written for full success 
and also for partial failure (be them temporary or not), and take MX retries 
into account. Such tests can be written within `server/mailet/integration-test` 
using the MockSmtpServer.

As a side note, such a feature might be a first step of JMAP EmailSubmission 
per-recipient delivery notification implementation.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscr...@james.apache.org
For additional commands, e-mail: server-dev-h...@james.apache.org

Reply via email to