Details
-
New Feature
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
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
Issue Links
- links to