Haraka 2.8.28 → 3.0.1
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/.eslintrc.yaml +2 -10
- package/Changes.md +84 -2
- package/Dockerfile +1 -1
- package/Plugins.md +9 -4
- package/README.md +2 -6
- package/bin/haraka +5 -4
- package/config/outbound.ini +0 -7
- package/config/plugins +1 -1
- package/config/smtp.ini +1 -1
- package/config/smtp_forward.ini +2 -8
- package/config/smtp_proxy.ini +0 -6
- package/connection.js +178 -204
- package/coverage/lcov.info +13863 -0
- package/coverage/tmp/coverage-42958-1658373250585-0.json +1 -0
- package/coverage/tmp/coverage-42961-1658373250529-0.json +1 -0
- package/dkim.js +66 -73
- package/docs/Body.md +1 -22
- package/docs/CoreConfig.md +2 -2
- package/docs/Header.md +1 -47
- package/docs/Outbound.md +8 -36
- package/endpoint.js +1 -1
- package/haraka.js +1 -1
- package/host_pool.js +8 -12
- package/logger.js +25 -32
- package/outbound/client_pool.js +11 -153
- package/outbound/config.js +5 -11
- package/outbound/hmail.js +109 -143
- package/outbound/index.js +13 -25
- package/outbound/mx_lookup.js +10 -7
- package/outbound/queue.js +8 -12
- package/outbound/timer_queue.js +2 -4
- package/outbound/tls.js +17 -18
- package/outbound/todo.js +1 -0
- package/package.json +57 -55
- package/plugins/auth/auth_base.js +39 -63
- package/plugins/auth/auth_bridge.js +3 -4
- package/plugins/auth/auth_proxy.js +16 -16
- package/plugins/auth/auth_vpopmaild.js +30 -37
- package/plugins/auth/flat_file.js +9 -13
- package/plugins/avg.js +9 -11
- package/plugins/backscatterer.js +1 -1
- package/plugins/block_me.js +2 -6
- package/plugins/bounce.js +106 -124
- package/plugins/clamd.js +59 -63
- package/plugins/data.signatures.js +6 -6
- package/plugins/data.uribl.js +1 -415
- package/plugins/delay_deny.js +19 -20
- package/plugins/dkim_sign.js +56 -62
- package/plugins/dkim_verify.js +9 -8
- package/plugins/dns_list_base.js +43 -42
- package/plugins/dnsbl.js +41 -46
- package/plugins/dnswl.js +23 -26
- package/plugins/early_talker.js +24 -28
- package/plugins/esets.js +8 -11
- package/plugins/greylist.js +161 -190
- package/plugins/helo.checks.js +175 -197
- package/plugins/mail_from.is_resolvable.js +38 -38
- package/plugins/messagesniffer.js +33 -40
- package/plugins/prevent_credential_leaks.js +7 -5
- package/plugins/process_title.js +16 -17
- package/plugins/queue/deliver.js +2 -2
- package/plugins/queue/lmtp.js +5 -6
- package/plugins/queue/qmail-queue.js +11 -13
- package/plugins/queue/quarantine.js +25 -34
- package/plugins/queue/rabbitmq.js +3 -2
- package/plugins/queue/rabbitmq_amqplib.js +9 -9
- package/plugins/queue/smtp_bridge.js +5 -4
- package/plugins/queue/smtp_forward.js +81 -89
- package/plugins/queue/smtp_proxy.js +21 -22
- package/plugins/queue/test.js +2 -1
- package/plugins/rcpt_to.host_list_base.js +20 -30
- package/plugins/rcpt_to.in_host_list.js +12 -14
- package/plugins/rcpt_to.max_count.js +7 -5
- package/plugins/record_envelope_addresses.js +4 -6
- package/plugins/relay.js +64 -74
- package/plugins/reseed_rng.js +1 -2
- package/plugins/spamassassin.js +56 -68
- package/plugins/status.js +2 -3
- package/plugins/tarpit.js +8 -11
- package/plugins/tls.js +14 -17
- package/plugins/toobusy.js +6 -8
- package/plugins/xclient.js +14 -25
- package/plugins.js +24 -29
- package/rfc1869.js +2 -2
- package/server.js +3 -13
- package/smtp_client.js +138 -215
- package/tests/config/smtp_forward.ini +0 -6
- package/tests/fixtures/line_socket.js +1 -1
- package/tests/fixtures/util_hmailitem.js +5 -7
- package/tests/fixtures/vm_harness.js +2 -2
- package/tests/host_pool.js +13 -14
- package/tests/installation/plugins/inherits.js +1 -2
- package/tests/logger.js +2 -2
- package/tests/plugins/bounce.js +6 -8
- package/tests/plugins/dkim_signer.js +7 -7
- package/tests/plugins/dns_list_base.js +7 -7
- package/tests/plugins/helo.checks.js +1 -1
- package/tests/plugins/mail_from.is_resolvable.js +10 -54
- package/tests/plugins/queue/smtp_forward.js +11 -11
- package/tests/plugins/rcpt_to.host_list_base.js +1 -1
- package/tests/plugins/rcpt_to.in_host_list.js +1 -1
- package/tests/plugins/spamassassin.js +1 -1
- package/tests/queue/multibyte +0 -0
- package/tests/queue/plain +0 -0
- package/tests/rfc1869.js +4 -1
- package/tests/server.js +15 -9
- package/tests/smtp_client/auth.js +4 -14
- package/tests/smtp_client/basic.js +5 -15
- package/tests/smtp_client.js +7 -3
- package/tests/transaction.js +72 -19
- package/tls_socket.js +75 -85
- package/transaction.js +7 -9
- package/attachment_stream.js +0 -118
- package/bin/spf +0 -48
- package/chunkemitter.js +0 -75
- package/config/data.uribl.excludes +0 -202
- package/config/data.uribl.ini +0 -37
- package/config/spf.ini +0 -1
- package/docs/plugins/attachment.md +0 -92
- package/docs/plugins/data.uribl.md +0 -120
- package/docs/plugins/spf.md +0 -142
- package/mailbody.js +0 -502
- package/mailheader.js +0 -304
- package/messagestream.js +0 -441
- package/plugins/aliases.js +0 -120
- package/plugins/attachment.js +0 -503
- package/plugins/connect.p0f.js +0 -5
- package/plugins/spf.js +0 -327
- package/spf.js +0 -689
- package/tests/mailbody.js +0 -348
- package/tests/mailheader.js +0 -138
- package/tests/messagestream.js +0 -34
- package/tests/plugins/aliases.js +0 -376
- package/tests/plugins/spf.js +0 -251
- package/tests/spf.js +0 -96
package/tests/spf.js
DELETED
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
const SPF = require('../spf').SPF;
|
|
2
|
-
SPF.prototype.log_debug = () => {}; // noop, hush debug output
|
|
3
|
-
|
|
4
|
-
function _set_up (done) {
|
|
5
|
-
this.SPF = new SPF();
|
|
6
|
-
done();
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
exports.SPF = {
|
|
10
|
-
setUp : _set_up,
|
|
11
|
-
'new SPF' (test) {
|
|
12
|
-
test.expect(1);
|
|
13
|
-
test.ok(this.SPF);
|
|
14
|
-
test.done();
|
|
15
|
-
},
|
|
16
|
-
'constants' (test) {
|
|
17
|
-
test.expect(8);
|
|
18
|
-
test.equal(1, this.SPF.SPF_NONE);
|
|
19
|
-
test.equal(2, this.SPF.SPF_PASS);
|
|
20
|
-
test.equal(3, this.SPF.SPF_FAIL);
|
|
21
|
-
test.equal(4, this.SPF.SPF_SOFTFAIL);
|
|
22
|
-
test.equal(5, this.SPF.SPF_NEUTRAL);
|
|
23
|
-
test.equal(6, this.SPF.SPF_TEMPERROR);
|
|
24
|
-
test.equal(7, this.SPF.SPF_PERMERROR);
|
|
25
|
-
test.equal(10, this.SPF.LIMIT);
|
|
26
|
-
test.done();
|
|
27
|
-
},
|
|
28
|
-
'mod_redirect, true' (test) {
|
|
29
|
-
test.expect(2);
|
|
30
|
-
this.SPF.been_there['example.com'] = true;
|
|
31
|
-
this.SPF.mod_redirect('example.com', (err, rc) => {
|
|
32
|
-
test.equal(null, err);
|
|
33
|
-
test.equal(1, rc);
|
|
34
|
-
test.done();
|
|
35
|
-
});
|
|
36
|
-
},
|
|
37
|
-
'mod_redirect, false' (test) {
|
|
38
|
-
test.expect(2);
|
|
39
|
-
this.SPF.count=0;
|
|
40
|
-
this.SPF.ip='212.70.129.94';
|
|
41
|
-
this.SPF.mail_from='fraud@aexp.com';
|
|
42
|
-
this.SPF.mod_redirect('aexp.com', (err, rc) => {
|
|
43
|
-
test.equal(null, err);
|
|
44
|
-
switch (rc) {
|
|
45
|
-
case 7:
|
|
46
|
-
// from time to time (this is the third time we've seen it,
|
|
47
|
-
// American Express publishes an invalid SPF record which results
|
|
48
|
-
// in a PERMERROR. Ignore it.
|
|
49
|
-
test.equal(rc, 7, "aexp SPF record is broken again");
|
|
50
|
-
break;
|
|
51
|
-
case 6:
|
|
52
|
-
test.equal(rc, 6, "temporary (likely DNS timeout) error");
|
|
53
|
-
break;
|
|
54
|
-
default:
|
|
55
|
-
test.equal(rc, 3);
|
|
56
|
-
}
|
|
57
|
-
test.done();
|
|
58
|
-
});
|
|
59
|
-
},
|
|
60
|
-
'check_host, gmail.com, fail' (test) {
|
|
61
|
-
test.expect(2);
|
|
62
|
-
this.SPF.count=0;
|
|
63
|
-
this.SPF.check_host('212.70.129.94', 'gmail.com', 'haraka.mail@gmail.com', (err, rc) => {
|
|
64
|
-
test.equal(null, err);
|
|
65
|
-
switch (rc) {
|
|
66
|
-
case 1:
|
|
67
|
-
test.equal(rc, 1, "none");
|
|
68
|
-
console.log('Why do DNS lookup fail to find gmail SPF record on GitHub Actions?');
|
|
69
|
-
break;
|
|
70
|
-
case 3:
|
|
71
|
-
test.equal(rc, 3, "fail");
|
|
72
|
-
break;
|
|
73
|
-
case 4:
|
|
74
|
-
test.equal(rc, 4, "soft fail");
|
|
75
|
-
break;
|
|
76
|
-
case 7:
|
|
77
|
-
test.equal(rc, 7, "perm error");
|
|
78
|
-
break;
|
|
79
|
-
default:
|
|
80
|
-
test.equal(rc, 4)
|
|
81
|
-
}
|
|
82
|
-
test.done();
|
|
83
|
-
});
|
|
84
|
-
},
|
|
85
|
-
'valid_ip, true' (test) {
|
|
86
|
-
test.expect(1);
|
|
87
|
-
test.equal(this.SPF.valid_ip(':212.70.129.94'), true);
|
|
88
|
-
test.done();
|
|
89
|
-
},
|
|
90
|
-
'valid_ip, false' (test) {
|
|
91
|
-
test.expect(1);
|
|
92
|
-
test.equal(this.SPF.valid_ip(':212.70.d.94'), false);
|
|
93
|
-
test.done();
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
}
|