Haraka 3.0.1 → 3.0.2
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/Changes.md +25 -0
- package/config/outbound.ini +1 -1
- package/connection.js +32 -10
- package/docs/plugins/clamd.md +1 -1
- package/docs/plugins/queue/smtp_forward.md +15 -37
- package/docs/plugins/queue/smtp_proxy.md +9 -11
- package/outbound/tls.js +1 -1
- package/package.json +13 -13
- package/plugins/dns_list_base.js +3 -3
- package/plugins/helo.checks.js +14 -6
- package/plugins/queue/smtp_forward.js +22 -16
- package/plugins/tls.js +1 -1
- package/tests/config/helo.checks.ini +52 -0
- package/tests/plugins/dns_list_base.js +41 -31
- package/tests/plugins/helo.checks.js +212 -239
- package/tests/plugins/queue/smtp_forward.js +36 -7
- package/coverage/lcov.info +0 -13863
- package/coverage/tmp/coverage-42958-1658373250585-0.json +0 -1
- package/coverage/tmp/coverage-42961-1658373250529-0.json +0 -1
|
@@ -69,7 +69,7 @@ exports.multi = {
|
|
|
69
69
|
setUp : _set_up,
|
|
70
70
|
'Spamcop' (test) {
|
|
71
71
|
test.expect(4);
|
|
72
|
-
|
|
72
|
+
this.plugin.multi('127.0.0.2', 'bl.spamcop.net', (err, zone, a, pending) => {
|
|
73
73
|
test.equal(null, err);
|
|
74
74
|
if (pending) {
|
|
75
75
|
test.ok((Array.isArray(a) && a.length > 0));
|
|
@@ -78,12 +78,11 @@ exports.multi = {
|
|
|
78
78
|
else {
|
|
79
79
|
test.done();
|
|
80
80
|
}
|
|
81
|
-
}
|
|
82
|
-
this.plugin.multi('127.0.0.2', 'bl.spamcop.net', cb);
|
|
81
|
+
})
|
|
83
82
|
},
|
|
84
83
|
'CBL' (test) {
|
|
85
84
|
test.expect(4);
|
|
86
|
-
|
|
85
|
+
this.plugin.multi('127.0.0.2', 'xbl.spamhaus.org', (err, zone, a, pending) => {
|
|
87
86
|
test.equal(null, err);
|
|
88
87
|
if (pending) {
|
|
89
88
|
test.ok((Array.isArray(a) && a.length > 0));
|
|
@@ -92,12 +91,12 @@ exports.multi = {
|
|
|
92
91
|
else {
|
|
93
92
|
test.done();
|
|
94
93
|
}
|
|
95
|
-
}
|
|
96
|
-
this.plugin.multi('127.0.0.2', 'xbl.spamhaus.org', cb);
|
|
94
|
+
})
|
|
97
95
|
},
|
|
98
96
|
'Spamcop + CBL' (test) {
|
|
99
97
|
test.expect(12);
|
|
100
|
-
|
|
98
|
+
const dnsbls = ['bl.spamcop.net','xbl.spamhaus.org'];
|
|
99
|
+
this.plugin.multi('127.0.0.2', dnsbls, (err, zone, a, pending) => {
|
|
101
100
|
test.equal(null, err);
|
|
102
101
|
if (pending) {
|
|
103
102
|
test.ok(zone);
|
|
@@ -110,15 +109,20 @@ exports.multi = {
|
|
|
110
109
|
test.equal(false, pending);
|
|
111
110
|
test.done();
|
|
112
111
|
}
|
|
113
|
-
}
|
|
114
|
-
const dnsbls = ['bl.spamcop.net','xbl.spamhaus.org'];
|
|
115
|
-
this.plugin.multi('127.0.0.2', dnsbls, cb);
|
|
112
|
+
})
|
|
116
113
|
},
|
|
117
114
|
'Spamcop + CBL + negative result' (test) {
|
|
118
115
|
test.expect(12);
|
|
119
|
-
|
|
116
|
+
const dnsbls = [ 'bl.spamcop.net','xbl.spamhaus.org' ];
|
|
117
|
+
this.plugin.multi('127.0.0.1', dnsbls, (err, zone, a, pending) => {
|
|
120
118
|
test.equal(null, err);
|
|
121
|
-
|
|
119
|
+
if (a && a[0] && a[0] === '127.255.255.254') {
|
|
120
|
+
test.deepEqual(['127.255.255.254'], a)
|
|
121
|
+
console.warn(`ERROR: DNSBLs don't work with PUBLIC DNS!`)
|
|
122
|
+
}
|
|
123
|
+
else {
|
|
124
|
+
test.equal(null, a)
|
|
125
|
+
}
|
|
122
126
|
if (pending) {
|
|
123
127
|
test.equal(true, pending);
|
|
124
128
|
test.ok(zone);
|
|
@@ -128,14 +132,19 @@ exports.multi = {
|
|
|
128
132
|
test.equal(null, zone);
|
|
129
133
|
test.done();
|
|
130
134
|
}
|
|
131
|
-
}
|
|
132
|
-
const dnsbls = ['bl.spamcop.net','xbl.spamhaus.org'];
|
|
133
|
-
this.plugin.multi('127.0.0.1', dnsbls, cb);
|
|
135
|
+
})
|
|
134
136
|
},
|
|
135
137
|
'IPv6 addresses supported' (test) {
|
|
136
138
|
test.expect(12);
|
|
137
|
-
|
|
138
|
-
|
|
139
|
+
const dnsbls = ['bl.spamcop.net','xbl.spamhaus.org'];
|
|
140
|
+
this.plugin.multi('::1', dnsbls, (err, zone, a, pending) => {
|
|
141
|
+
if (a && a[0] && a[0] === '127.255.255.254') {
|
|
142
|
+
test.deepEqual(['127.255.255.254'], a)
|
|
143
|
+
console.warn(`ERROR: DNSBLs don't work with PUBLIC DNS!`)
|
|
144
|
+
}
|
|
145
|
+
else {
|
|
146
|
+
test.equal(null, a);
|
|
147
|
+
}
|
|
139
148
|
if (pending) {
|
|
140
149
|
test.deepEqual(null, err);
|
|
141
150
|
test.equal(true, pending);
|
|
@@ -147,9 +156,7 @@ exports.multi = {
|
|
|
147
156
|
test.equal(null, zone);
|
|
148
157
|
test.done();
|
|
149
158
|
}
|
|
150
|
-
}
|
|
151
|
-
const dnsbls = ['bl.spamcop.net','xbl.spamhaus.org'];
|
|
152
|
-
this.plugin.multi('::1', dnsbls, cb);
|
|
159
|
+
})
|
|
153
160
|
}
|
|
154
161
|
}
|
|
155
162
|
|
|
@@ -157,25 +164,28 @@ exports.first = {
|
|
|
157
164
|
setUp : _set_up,
|
|
158
165
|
'positive result' (test) {
|
|
159
166
|
test.expect(3);
|
|
160
|
-
|
|
167
|
+
const dnsbls = [ 'xbl.spamhaus.org', 'bl.spamcop.net' ];
|
|
168
|
+
this.plugin.first('127.0.0.2', dnsbls, (err, zone, a) => {
|
|
161
169
|
test.equal(null, err);
|
|
162
170
|
test.ok(zone);
|
|
163
171
|
test.ok((Array.isArray(a) && a.length > 0));
|
|
164
172
|
test.done();
|
|
165
|
-
}
|
|
166
|
-
const dnsbls = [ 'xbl.spamhaus.org', 'bl.spamcop.net' ];
|
|
167
|
-
this.plugin.first('127.0.0.2', dnsbls , cb);
|
|
173
|
+
})
|
|
168
174
|
},
|
|
169
175
|
'negative result' (test) {
|
|
170
|
-
test.expect(
|
|
171
|
-
|
|
176
|
+
test.expect(2);
|
|
177
|
+
const dnsbls = [ 'xbl.spamhaus.org', 'bl.spamcop.net' ];
|
|
178
|
+
this.plugin.first('127.0.0.1', dnsbls, (err, zone, a) => {
|
|
172
179
|
test.equal(null, err);
|
|
173
|
-
|
|
174
|
-
|
|
180
|
+
if (a && a[0] && a[0] === '127.255.255.254') {
|
|
181
|
+
test.deepEqual(['127.255.255.254'], a)
|
|
182
|
+
console.warn(`ERROR: DNSBLs don't work with PUBLIC DNS!`)
|
|
183
|
+
}
|
|
184
|
+
else {
|
|
185
|
+
test.equal(null, a);
|
|
186
|
+
}
|
|
175
187
|
test.done();
|
|
176
|
-
}
|
|
177
|
-
const dnsbls = [ 'xbl.spamhaus.org', 'bl.spamcop.net' ];
|
|
178
|
-
this.plugin.first('127.0.0.1', dnsbls, cb);
|
|
188
|
+
})
|
|
179
189
|
},
|
|
180
190
|
'each_cb' (test) {
|
|
181
191
|
test.expect(7);
|