Uploaded image for project: 'James Server'
  1. James Server
  2. JAMES-2912

RemoteDelivery: add a onSuccessProcessor

    XMLWordPrintableJSON

    Details

      Description

      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.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              btellier Benoit Tellier
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: