From 4c502aaf218c49c5d4eae461afefba2c8ca6d553 Mon Sep 17 00:00:00 2001 From: lnedry Date: Sun, 4 Feb 2024 15:22:47 -0500 Subject: [PATCH] Fix Haraka help Fixed issue #3212 - Haraka help now displays plugin hooks in order of execution. --- bin/haraka | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/bin/haraka b/bin/haraka index 9acf6b076..8f4c49f43 100755 --- a/bin/haraka +++ b/bin/haraka @@ -460,17 +460,19 @@ else if (parsed.order) { plugins = require(path.join(base, "plugins")); plugins.load_plugins(); console.log(''); - const hooks = Object.keys(plugins.registered_hooks); + const hooks = ["init_master", "init_child", "init_http", "init_wss", "connect_init", "lookup_rdns", "connect", "capabilities", "unrecognized_command", "disconnect", "helo", "ehlo", "quit", "vrfy", "noop", "rset", "mail", "rcpt", "rcpt_ok", "data", "data_post", "max_data_exceeded", "queue", "queue_outbound", "queue_ok", "reset_transaction", "deny", "get_mx", "deferred", "bounce", "delivered", "send_email", "pre_send_trans_email"]; for (let h = 0; h < hooks.length; h++) { const hook = hooks[h]; - console.log(sprintf('%\'--80s', `Hook: ${hook} `)); - console.log(sprintf('%-35s %-35s %-4s %-3s', 'Plugin', 'Method', 'Prio', 'T/O')); - console.log(sprintf("%'-80s",'')); - for (let p=0; p