Closed matteomattei closed 2 years ago
I guess you can silent bounce it by using delivery.skipBounce
in your plugin.
Ex:
let err = new Error('Reject message here');
err.responseCode = 554;
delivery.skipBounce = err.message;
return next(err);
@matteomattei @andris9 close if ok.
Hello, I am setting deliveryZone to null for all deliveries based on some criteria:
I want to drop all these deliveries instead of keeping them in mongo but turn back to the client the message ID as the message have been correctly processed. I want it behaves more or less in the same way of an account in the suppression list: the message is never delivered but the caller receives a message-id in answer.
I see I would call something like releaseDelivery() to cleanup the database, but I don't see any hook to attach and call it.
I know I can connect to mongo from an external process and remove all records with deliveryZone = null in zone-queue collection and related records in mail.chunks and mail.files but I would like to avoid a cronjob like this....
Any idea?