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.
- package/.prettierignore +1 -1
- package/{Changes.md → CHANGELOG.md} +34 -0
- package/CONTRIBUTORS.md +26 -26
- package/README.md +68 -93
- package/SECURITY.md +178 -0
- package/bin/haraka +7 -14
- package/config/plugins +0 -3
- package/docs/Connection.md +126 -39
- package/docs/CoreConfig.md +92 -74
- package/docs/HAProxy.md +41 -25
- package/docs/Logging.md +68 -38
- package/docs/Outbound.md +124 -179
- package/docs/Plugins.md +38 -59
- package/docs/Transaction.md +78 -83
- package/docs/Tutorial.md +122 -209
- package/docs/plugins/aliases.md +1 -141
- package/docs/plugins/auth/auth_ldap.md +2 -39
- package/docs/plugins/max_unrecognized_commands.md +4 -18
- package/docs/plugins/process_title.md +3 -3
- package/docs/plugins/reseed_rng.md +11 -13
- package/docs/plugins/tls.md +7 -7
- package/docs/plugins/toobusy.md +10 -4
- package/docs/tutorials/SettingUpOutbound.md +40 -48
- package/endpoint.js +32 -2
- package/outbound/hmail.js +3 -2
- package/outbound/index.js +3 -0
- package/package.json +21 -34
- package/plugins/queue/smtp_forward.js +4 -4
- package/run_tests +3 -15
- package/server.js +17 -7
- package/smtp_client.js +8 -6
- package/test/connection.js +234 -0
- package/test/endpoint.js +32 -4
- package/test/host_pool.js +57 -31
- package/test/logger.js +75 -135
- package/test/outbound/bounce_net_errors.js +87 -131
- package/test/outbound/bounce_rfc3464.js +177 -254
- package/test/outbound/hmail.js +19 -0
- package/test/outbound/index.js +189 -0
- package/test/outbound/queue.js +92 -0
- package/test/plugins/auth/auth_base.js +39 -44
- package/test/plugins/auth/auth_vpopmaild.js +8 -9
- package/test/plugins/queue/smtp_forward.js +953 -183
- package/test/plugins/rcpt_to.host_list_base.js +58 -93
- package/test/plugins/rcpt_to.in_host_list.js +126 -175
- package/test/plugins/record_envelope_addresses.js +8 -8
- package/test/plugins/status.js +10 -10
- package/test/plugins/tls.js +9 -19
- package/test/plugins/xclient.js +75 -110
- package/test/plugins.js +10 -13
- package/test/rfc1869.js +50 -70
- package/test/server.js +438 -421
- package/test/smtp_client.js +1192 -218
- package/test/tls_socket.js +242 -0
- 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 = (
|
|
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.
|
|
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)
|