Skip to content

"batch" processing at the end of connection: does Haraka allow for this? #3343

Closed Answered by msimerson
ThomasEhardt-smarsh asked this question in Q&A
Discussion options

You must be logged in to vote

Yes.

You can do this with a plugin. Your plugin would need to validate the recipient. When it does so, for the messages that want future uploading to S3, set the queue.wants property:

  • connection.transaction.notes.set('queue.wants', 'myPlugin')

Assure your plugin hooks both queue and queue_outbound. Then you're assured that your plugin will handle delivery. You can employ any logic you wish within the queue hook. You probably want something like this:

// myPlugin
exports.register = function () {
  this.register_hook('queue', 'my_queue_function')
  this.register_hook('queue_outbound', 'my_queue_function')
}
exports.my_queue_function = function (next, connection) {
  // do your magic. Queu…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@ThomasEhardt-smarsh
Comment options

@msimerson
Comment options

Answer selected by msimerson
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants