Haraka 2.8.28 → 3.0.0
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 +68 -2
- package/Dockerfile +1 -1
- package/Plugins.md +7 -4
- package/README.md +2 -6
- 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 +65 -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 +42 -40
- 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/.eslintrc.yaml
CHANGED
|
@@ -1,15 +1,7 @@
|
|
|
1
1
|
env:
|
|
2
2
|
es6: true
|
|
3
3
|
node: true
|
|
4
|
-
|
|
5
|
-
parserOptions:
|
|
6
|
-
#ecmaVersion: 2015 (6)
|
|
7
|
-
#ecmaVersion: 2016 (7) (node 6)
|
|
8
|
-
#ecmaVersion: 2017 (8) (node 8)
|
|
9
|
-
ecmaVersion: 2017
|
|
10
|
-
#ecmaVersion: 2018 (9) (node 10)
|
|
11
|
-
#ecmaVersion: 2019 (10) (node 12)
|
|
12
|
-
#ecmaVersion: 2020 (11) (node 14)
|
|
4
|
+
es2020: true
|
|
13
5
|
|
|
14
6
|
plugins:
|
|
15
7
|
- haraka
|
|
@@ -17,7 +9,7 @@ plugins:
|
|
|
17
9
|
root: true
|
|
18
10
|
|
|
19
11
|
rules:
|
|
20
|
-
semi-style: [error, last]
|
|
12
|
+
semi-style: [ error, last ]
|
|
21
13
|
prefer-template: "warn"
|
|
22
14
|
no-unneeded-ternary: 1
|
|
23
15
|
|
package/Changes.md
CHANGED
|
@@ -1,5 +1,68 @@
|
|
|
1
1
|
|
|
2
|
-
|
|
2
|
+
### Unreleased
|
|
3
|
+
|
|
4
|
+
### [3.0.0] - 2022-12-17
|
|
5
|
+
|
|
6
|
+
#### Added
|
|
7
|
+
|
|
8
|
+
- feat: prevent local delivery loop when target exchange resolves to a local hostname #3002
|
|
9
|
+
- feat: format DKIM signature to multiline #2991
|
|
10
|
+
|
|
11
|
+
#### Fixed
|
|
12
|
+
|
|
13
|
+
- fix(tls): redis promise syntax for tls & ob/tls #3064
|
|
14
|
+
- fix(attachment): error handling with complex archive #3035
|
|
15
|
+
- fix(smtp_client): run "secured" once, fixes #3020
|
|
16
|
+
- fix(smtp_client): add missing `$` char in front of interpolated string
|
|
17
|
+
- fix(auth_proxy): run "secured" only once, improvement for #3022
|
|
18
|
+
- fix(helo): remove multi-check from should_skip #3041
|
|
19
|
+
- fix(outbound): outbound local mx check #3010
|
|
20
|
+
- fix(outbound): prevent delivery loop when target MX resolves to local hostname #3002
|
|
21
|
+
- fix(conn): socket can't be released when disconnect after DATA command #2994
|
|
22
|
+
|
|
23
|
+
#### Changed
|
|
24
|
+
|
|
25
|
+
- dep(generic-pool): remove pooling from outbound #3115
|
|
26
|
+
- smtp_client: disable pooling in get_client_plugin, #3113
|
|
27
|
+
- smtp_forward: restore ability to enable queue_outbound #3119
|
|
28
|
+
- ./mailbody & ./mailheader moved to haraka-email-message #3071
|
|
29
|
+
- config/plugins: update name of uribl plugin
|
|
30
|
+
- doc(queue.js) spelling & grammar improvement #3051
|
|
31
|
+
- doc(rails): add haraka-plugin-queue-rails #2995
|
|
32
|
+
- doc(smtp.ini): correct spelling of SMTPUTF8 #2993
|
|
33
|
+
- style(es6): use optional chaining when accessing transactions #2732
|
|
34
|
+
- style(smtp_client): pass args as objects (was positional)
|
|
35
|
+
- style(plugin/\*): transaction guarding #3032
|
|
36
|
+
- dep(spf): remove to separate plugin #3078
|
|
37
|
+
- dep(iconv): removed, declared in haraka-email-message)
|
|
38
|
+
- dep(haraka-plugin-redis)!: 1.0 -> 2.0 #3038
|
|
39
|
+
- dep(redis)!: 3.1 -> 4.1 #3058
|
|
40
|
+
- dep(generic-pool): remove pooling from outbound #3115
|
|
41
|
+
- smtp_client: remove smtp_\* pooling support in #3113
|
|
42
|
+
- dep: bump plugin versions #3063
|
|
43
|
+
- dep: bump haraka-plugin-asn from 1.0.9 to 2.0.0 #3062
|
|
44
|
+
- dep(redis): 3.1 -> 4.1 #3058
|
|
45
|
+
- dep(nopt): 5 -> 6.0.0 #3076
|
|
46
|
+
- dep(haraka-plugin-fcrdns): 1.0.3 -> 1.1.0 #3076
|
|
47
|
+
- dep(haraka-plugin-redis): 1.0 -> 2.0 #3038
|
|
48
|
+
- dep(nodemailer): 6.7.0 to 6.7.2 #3000, #3004
|
|
49
|
+
- dep: add explicit dependency on node-gyp 9
|
|
50
|
+
- ci: github action tweaks #3047
|
|
51
|
+
- chore: transaction guarding #3032
|
|
52
|
+
- ci: enable windows node 16 testing #3036
|
|
53
|
+
- chore: update phusion image #2988
|
|
54
|
+
- chore: add lots of `if (!transaction) return` in places #2732
|
|
55
|
+
- chore(test): build shims for windows-2022 & node on windows #3052
|
|
56
|
+
- chore(test): restore CI tests to working order #3030
|
|
57
|
+
- dkim_sign: reformat dkim signature to multi-line #2991
|
|
58
|
+
- dkim_sign: remove spurious error logging #3034
|
|
59
|
+
- tls: add force_tls option to the ToDo object
|
|
60
|
+
- fix(banner): banner was inserted erroneously into text attachments
|
|
61
|
+
- outbound: remove hardcoded AUTH PLAIN authorization identity
|
|
62
|
+
- outbound: set acquireTimeoutMillis to prevent constant reconnect to unreachable servers
|
|
63
|
+
- style(smtp_client): pass args as objects (was positional)
|
|
64
|
+
- uribl: timeout DNS 1 second before plugin, #3077
|
|
65
|
+
- uribl: load .ini config to plugin.cfg, add basic tests #3077
|
|
3
66
|
|
|
4
67
|
|
|
5
68
|
## 2.8.28 - 2021-10-14
|
|
@@ -14,7 +77,7 @@
|
|
|
14
77
|
- spamassassin: allow returning DENYSOFT on errors #2967
|
|
15
78
|
- dep: use caret version range for all dependencies #2965
|
|
16
79
|
- outbound: disable outbound to localhost by default #2952
|
|
17
|
-
- connection error logging: use key-value
|
|
80
|
+
- connection error logging: use key-value pairs #2921
|
|
18
81
|
- tls: change default to NOT send TLS client certs #2902
|
|
19
82
|
- dep: redis is now a dependency #2896
|
|
20
83
|
- use address-rfc2821 2.0.0
|
|
@@ -1263,3 +1326,6 @@
|
|
|
1263
1326
|
* Small fixes to data.uribl
|
|
1264
1327
|
|
|
1265
1328
|
## 1.4.0 -
|
|
1329
|
+
|
|
1330
|
+
|
|
1331
|
+
[3.0.0]: https://github.com/haraka/Haraka/releases/tag/3.0.0
|
package/Dockerfile
CHANGED
package/Plugins.md
CHANGED
|
@@ -42,7 +42,7 @@ Create a PR adding yours to this list.
|
|
|
42
42
|
| [clamd][url-clamd] | Anti-Virus scanning with ClamAV |
|
|
43
43
|
| [connect.p0f][url-p0f] | TCP Fingerprinting |
|
|
44
44
|
| [data.signatures][url-sigs] | Block emails whose bodies match signatures |
|
|
45
|
-
| [
|
|
45
|
+
| [uribl][url-uribl] | Block based on URI blacklists |
|
|
46
46
|
| [dcc][url-dcc] | Distributed Checksum Clearinghouse |
|
|
47
47
|
| [delay_deny][url-delay] | Delays all pre-DATA 'deny' results |
|
|
48
48
|
| [dkim_sign][url-sign] | DKIM sign outbound messages |
|
|
@@ -77,6 +77,7 @@ Create a PR adding yours to this list.
|
|
|
77
77
|
| queue/[quarantine][url-qquart] | queue to a quarantine directory |
|
|
78
78
|
| queue/[rabbitmq][url-qrabbit] | queue to RabbitMQ |
|
|
79
79
|
| queue/[rabbitmq_amqplib][url-qrabbita] | queue to RabbitMQ using amqplib |
|
|
80
|
+
| queue/[rails][url-qrails] | queue messages to a Rails app using [Action Mailbox][url-action-mailbox] |
|
|
80
81
|
| queue/[smtp_bridge][url-qbridge] | Bridge SMTP sessions to another MTA |
|
|
81
82
|
| queue/[smtp_forward][url-qforward] | Forward emails to another MTA |
|
|
82
83
|
| queue/[smtp_proxy][url-qproxy] | Proxy SMTP connections to another MTA |
|
|
@@ -110,9 +111,10 @@ Create a PR adding yours to this list.
|
|
|
110
111
|
[plugins-doc]: https://haraka.github.io/manual/Plugins.html
|
|
111
112
|
[url-access]: https://github.com/haraka/haraka-plugin-access
|
|
112
113
|
[url-acc-files]: https://github.com/acharkizakaria/haraka-plugin-accounting-files/blob/master/README.md
|
|
114
|
+
[url-action-mailbox]: https://guides.rubyonrails.org/action_mailbox_basics.html
|
|
113
115
|
[url-aliases]: https://github.com/haraka/Haraka/blob/master/docs/plugins/aliases.md
|
|
114
116
|
[url-asn]: https://github.com/haraka/haraka-plugin-asn
|
|
115
|
-
[url-attach]: https://github.com/haraka/
|
|
117
|
+
[url-attach]: https://github.com/haraka/haraka-plugin-attachment
|
|
116
118
|
[url-authencflat]: https://github.com/AuspeXeu/haraka-plugin-auth-enc-file
|
|
117
119
|
[url-authflat]: https://github.com/haraka/Haraka/blob/master/docs/plugins/auth/flat_file.md
|
|
118
120
|
[url-authbridge]: https://github.com/haraka/Haraka/blob/master/docs/plugins/auth/auth_bridge.md
|
|
@@ -130,7 +132,7 @@ Create a PR adding yours to this list.
|
|
|
130
132
|
[url-p0f]: https://github.com/haraka/haraka-plugin-p0f
|
|
131
133
|
[url-headers]: https://github.com/haraka/haraka-plugin-headers
|
|
132
134
|
[url-sigs]: https://github.com/haraka/Haraka/blob/master/docs/plugins/data.signatures.md
|
|
133
|
-
[url-uribl]: https://github.com/haraka/
|
|
135
|
+
[url-uribl]: https://github.com/haraka/haraka-plugin-uribl
|
|
134
136
|
[url-dcc]: https://github.com/haraka/haraka-plugin-dcc
|
|
135
137
|
[url-delay]: https://github.com/haraka/Haraka/blob/master/docs/plugins/delay_deny.md
|
|
136
138
|
[url-sign]: https://github.com/haraka/Haraka/blob/master/docs/plugins/dkim_sign.md
|
|
@@ -167,6 +169,7 @@ Create a PR adding yours to this list.
|
|
|
167
169
|
[url-qbridge]: https://github.com/haraka/Haraka/blob/master/docs/plugins/queue/smtp_bridge.md
|
|
168
170
|
[url-qforward]: https://github.com/haraka/Haraka/blob/master/docs/plugins/queue/smtp_forward.md
|
|
169
171
|
[url-qproxy]: https://github.com/haraka/Haraka/blob/master/docs/plugins/queue/smtp_proxy.md
|
|
172
|
+
[url-qrails]: https://github.com/mailprotector/haraka-plugin-queue-rails
|
|
170
173
|
[url-redis]: https://github.com/haraka/haraka-plugin-redis
|
|
171
174
|
[url-rhost]: https://github.com/haraka/Haraka/blob/master/docs/plugins/rcpt_to.in_host_list.md
|
|
172
175
|
[url-rcpt-ldap]: https://github.com/haraka/haraka-plugin-rcpt-ldap
|
|
@@ -177,7 +180,7 @@ Create a PR adding yours to this list.
|
|
|
177
180
|
[url-rng]: https://github.com/haraka/Haraka/blob/master/docs/plugins/reseed_rng.md
|
|
178
181
|
[url-rspamd]: https://github.com/haraka/haraka-plugin-rspamd
|
|
179
182
|
[url-spamass]: https://github.com/haraka/Haraka/blob/master/docs/plugins/spamassassin.md
|
|
180
|
-
[url-spf]: https://github.com/haraka/
|
|
183
|
+
[url-spf]: https://github.com/haraka/haraka-plugin-spf
|
|
181
184
|
[url-srs]: https://github.com/swerter/haraka-plugins/blob/master/plugins/srs.js
|
|
182
185
|
[url-tarpit]: https://github.com/haraka/Haraka/blob/master/docs/plugins/tarpit.md
|
|
183
186
|
[url-tls]: https://github.com/haraka/Haraka/blob/master/docs/plugins/tls.md
|
package/README.md
CHANGED
|
@@ -2,8 +2,7 @@
|
|
|
2
2
|
Haraka - a Node.js Mail Server
|
|
3
3
|
------------------------------
|
|
4
4
|
|
|
5
|
-

|
|
5
|
+

|
|
7
6
|
[![Coverage Status][cov-img]][cov-url]
|
|
8
7
|
|
|
9
8
|
|
|
@@ -28,7 +27,6 @@ queued for outbound delivery.
|
|
|
28
27
|
### Getting Help
|
|
29
28
|
|
|
30
29
|
* [Join the mailing list][8] (implemented as a Haraka plugin)
|
|
31
|
-
* [Join us on Slack][14]
|
|
32
30
|
* [GitHub Issues][15]
|
|
33
31
|
|
|
34
32
|
|
|
@@ -131,8 +129,7 @@ Finally run Haraka:
|
|
|
131
129
|
|
|
132
130
|
Haraka is MIT licensed - see the [LICENSE][16] file for details.
|
|
133
131
|
|
|
134
|
-
Haraka is a project started by [Matt Sergeant][17], a 10 year veteran of the email
|
|
135
|
-
and anti-spam world. Previous projects have been the project leader for
|
|
132
|
+
Haraka is a project started by [Matt Sergeant][17], a 10 year veteran of the email and anti-spam world. Previous projects have been the project leader for
|
|
136
133
|
SpamAssassin and a hacker on [Qpsmtpd][13].
|
|
137
134
|
|
|
138
135
|
[1]: http://nodejs.org/
|
|
@@ -148,7 +145,6 @@ SpamAssassin and a hacker on [Qpsmtpd][13].
|
|
|
148
145
|
[11]: https://haraka.github.io/manual/plugins/dnsbl.html
|
|
149
146
|
[12]: https://github.com/haraka/Haraka/tree/master/plugins
|
|
150
147
|
[13]: https://github.com/smtpd/qpsmtpd/
|
|
151
|
-
[14]: https://communityinviter.com/apps/harakaserver/public-inviter
|
|
152
148
|
[15]: https://github.com/haraka/Haraka/issues
|
|
153
149
|
[16]: https://github.com/haraka/Haraka/blob/master/LICENSE
|
|
154
150
|
[17]: https://github.com/baudehlo
|
package/config/outbound.ini
CHANGED
package/config/plugins
CHANGED
package/config/smtp.ini
CHANGED
package/config/smtp_forward.ini
CHANGED
|
@@ -4,12 +4,6 @@ host=localhost
|
|
|
4
4
|
; port to connect to
|
|
5
5
|
port=2555
|
|
6
6
|
;
|
|
7
|
-
; timeout backend connection from pool
|
|
8
|
-
;timeout=300
|
|
9
|
-
;
|
|
10
|
-
; max connections in pool
|
|
11
|
-
;max_connections=1000
|
|
12
|
-
;
|
|
13
7
|
; uncomment to enable TLS to the backend SMTP server
|
|
14
8
|
;enable_tls=true
|
|
15
9
|
;
|
|
@@ -23,5 +17,5 @@ port=2555
|
|
|
23
17
|
;auth_pass=
|
|
24
18
|
|
|
25
19
|
; should outbound messages be delivered by smtp_forward?
|
|
26
|
-
; see
|
|
27
|
-
; enable_outbound=
|
|
20
|
+
; see #1472 and #2795
|
|
21
|
+
; enable_outbound=false
|
package/config/smtp_proxy.ini
CHANGED