Haraka 3.1.4 → 3.1.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (55) hide show
  1. package/.prettierignore +1 -1
  2. package/{Changes.md → CHANGELOG.md} +34 -0
  3. package/CONTRIBUTORS.md +26 -26
  4. package/README.md +68 -93
  5. package/SECURITY.md +178 -0
  6. package/bin/haraka +7 -14
  7. package/config/plugins +0 -3
  8. package/docs/Connection.md +126 -39
  9. package/docs/CoreConfig.md +92 -74
  10. package/docs/HAProxy.md +41 -25
  11. package/docs/Logging.md +68 -38
  12. package/docs/Outbound.md +124 -179
  13. package/docs/Plugins.md +38 -59
  14. package/docs/Transaction.md +78 -83
  15. package/docs/Tutorial.md +122 -209
  16. package/docs/plugins/aliases.md +1 -141
  17. package/docs/plugins/auth/auth_ldap.md +2 -39
  18. package/docs/plugins/max_unrecognized_commands.md +4 -18
  19. package/docs/plugins/process_title.md +3 -3
  20. package/docs/plugins/reseed_rng.md +11 -13
  21. package/docs/plugins/tls.md +7 -7
  22. package/docs/plugins/toobusy.md +10 -4
  23. package/docs/tutorials/SettingUpOutbound.md +40 -48
  24. package/endpoint.js +32 -2
  25. package/outbound/hmail.js +3 -2
  26. package/outbound/index.js +3 -0
  27. package/package.json +21 -34
  28. package/plugins/queue/smtp_forward.js +4 -4
  29. package/run_tests +3 -15
  30. package/server.js +17 -7
  31. package/smtp_client.js +8 -6
  32. package/test/connection.js +234 -0
  33. package/test/endpoint.js +32 -4
  34. package/test/host_pool.js +57 -31
  35. package/test/logger.js +75 -135
  36. package/test/outbound/bounce_net_errors.js +87 -131
  37. package/test/outbound/bounce_rfc3464.js +177 -254
  38. package/test/outbound/hmail.js +19 -0
  39. package/test/outbound/index.js +189 -0
  40. package/test/outbound/queue.js +92 -0
  41. package/test/plugins/auth/auth_base.js +39 -44
  42. package/test/plugins/auth/auth_vpopmaild.js +8 -9
  43. package/test/plugins/queue/smtp_forward.js +953 -183
  44. package/test/plugins/rcpt_to.host_list_base.js +58 -93
  45. package/test/plugins/rcpt_to.in_host_list.js +126 -175
  46. package/test/plugins/record_envelope_addresses.js +8 -8
  47. package/test/plugins/status.js +10 -10
  48. package/test/plugins/tls.js +9 -19
  49. package/test/plugins/xclient.js +75 -110
  50. package/test/plugins.js +10 -13
  51. package/test/rfc1869.js +50 -70
  52. package/test/server.js +438 -421
  53. package/test/smtp_client.js +1192 -218
  54. package/test/tls_socket.js +242 -0
  55. package/tls_socket.js +18 -22
@@ -1,11 +1,12 @@
1
1
  'use strict'
2
2
 
3
- const assert = require('node:assert')
3
+ const assert = require('node:assert/strict')
4
4
  const path = require('node:path')
5
+ const { describe, it, beforeEach } = require('node:test')
5
6
 
6
7
  const fixtures = require('haraka-test-fixtures')
7
8
 
8
- const _set_up = (done) => {
9
+ const _set_up = () => {
9
10
  this.backup = {}
10
11
 
11
12
  this.plugin = new fixtures.plugin('auth/auth_vpopmaild')
@@ -17,14 +18,12 @@ const _set_up = (done) => {
17
18
 
18
19
  this.connection = fixtures.connection.createConnection()
19
20
  this.connection.capabilities = null
20
-
21
- done()
22
21
  }
23
22
 
24
23
  describe('hook_capabilities', () => {
25
24
  beforeEach(_set_up)
26
25
 
27
- it('no TLS', (done) => {
26
+ it('no TLS', (t, done) => {
28
27
  this.plugin.hook_capabilities((rc, msg) => {
29
28
  assert.equal(undefined, rc)
30
29
  assert.equal(undefined, msg)
@@ -33,7 +32,7 @@ describe('hook_capabilities', () => {
33
32
  }, this.connection)
34
33
  })
35
34
 
36
- it('with TLS', (done) => {
35
+ it('with TLS', (t, done) => {
37
36
  this.connection.tls.enabled = true
38
37
  this.connection.capabilities = []
39
38
  this.plugin.hook_capabilities((rc, msg) => {
@@ -44,7 +43,7 @@ describe('hook_capabilities', () => {
44
43
  }, this.connection)
45
44
  })
46
45
 
47
- it('with TLS, sysadmin', (done) => {
46
+ it('with TLS, sysadmin', (t, done) => {
48
47
  this.connection.tls.enabled = true
49
48
  this.connection.capabilities = []
50
49
  this.plugin.hook_capabilities((rc, msg) => {
@@ -62,14 +61,14 @@ describe('get_vpopmaild_socket', () => {
62
61
  it('any', () => {
63
62
  const socket = this.plugin.get_vpopmaild_socket('foo@localhost.com')
64
63
  assert.ok(socket)
65
- socket.end()
64
+ socket.destroy()
66
65
  })
67
66
  })
68
67
 
69
68
  describe('get_plain_passwd', () => {
70
69
  beforeEach(_set_up)
71
70
 
72
- it('matt@example.com', (done) => {
71
+ it('matt@example.com', (t, done) => {
73
72
  if (this.plugin.cfg['example.com'].sysadmin) {
74
73
  this.plugin.get_plain_passwd('matt@example.com', (pass) => {
75
74
  assert.ok(pass)