Skip to content

Commit

Permalink
fix: init_wildduck_transaction in index, in case hook_mail not run (#33)
Browse files Browse the repository at this point in the history
* init_wildduck_transaction in index, in case hook_mail not run

There's no guarantee that hook_mail will get run. If some other Haraka plugin runs on hook_mail before wildduck and calls `next(OK)`, then wildduck's hook_mail won't ever get called. That crashes the plugin in the recipient handler that does this: `const { recipients, forwards, users } = txn.notes.targets;`.

Additionally:

- add @haraka/eslint-config (which brings in Haraka globals)
- use shorter logging syntax
-

* preserve arity of real_rcpt_handler
  • Loading branch information
msimerson authored Apr 17, 2024
1 parent 307206e commit 30374bd
Show file tree
Hide file tree
Showing 5 changed files with 123 additions and 120 deletions.
7 changes: 4 additions & 3 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
{
"rules": {
"no-await-in-loop": 0
"no-await-in-loop": 0,
"prefer-const": 1,
},
"extends": ["nodemailer", "prettier"],
"extends": ["nodemailer", "prettier", "@haraka"],
"parserOptions": {
"ecmaVersion": 2020
"ecmaVersion": 2022
}
}
Loading

0 comments on commit 30374bd

Please sign in to comment.