haraka 0.0.33 → 3.3.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/.githooks/pre-commit +41 -0
- package/.prettierignore +7 -0
- package/.qlty/.gitignore +7 -0
- package/.qlty/configs/.shellcheckrc +1 -0
- package/.qlty/qlty.toml +15 -0
- package/CHANGELOG.md +1898 -0
- package/CONTRIBUTORS.md +34 -0
- package/Dockerfile +50 -0
- package/LICENSE +22 -0
- package/Plugins.md +227 -0
- package/README.md +119 -4
- package/SECURITY.md +178 -0
- package/TODO +22 -0
- package/bin/haraka +593 -0
- package/bin/haraka_grep +32 -0
- package/config/aliases +2 -0
- package/config/auth_flat_file.ini +7 -0
- package/config/auth_vpopmaild.ini +9 -0
- package/config/connection.ini +79 -0
- package/config/delay_deny.ini +7 -0
- package/config/host_list +3 -0
- package/config/host_list_regex +6 -0
- package/config/http.ini +11 -0
- package/config/lmtp.ini +7 -0
- package/config/log.ini +11 -0
- package/config/outbound.bounce_message +18 -0
- package/config/outbound.bounce_message_html +36 -0
- package/config/outbound.bounce_message_image +106 -0
- package/config/outbound.ini +24 -0
- package/config/plugins +67 -0
- package/config/smtp.ini +37 -0
- package/config/smtp_bridge.ini +4 -0
- package/config/smtp_forward.ini +31 -0
- package/config/smtp_proxy.ini +27 -0
- package/config/tarpit.timeout +1 -0
- package/config/tls.ini +83 -0
- package/config/watch.ini +12 -0
- package/config/xclient.hosts +2 -0
- package/connection.js +1865 -0
- package/contrib/Haraka.cf +6 -0
- package/contrib/Haraka.pm +35 -0
- package/contrib/bad_smtp_server.pl +25 -0
- package/contrib/bsd-rc.d/haraka +63 -0
- package/contrib/debian-init.d/haraka +87 -0
- package/contrib/haraka.init +96 -0
- package/contrib/haraka.service +23 -0
- package/contrib/plugin2npm.sh +81 -0
- package/contrib/ubuntu-upstart/haraka.conf +27 -0
- package/docs/Body.md +1 -0
- package/docs/Config.md +1 -0
- package/docs/Connection.md +153 -0
- package/docs/CoreConfig.md +96 -0
- package/docs/CustomReturnCodes.md +3 -0
- package/docs/HAProxy.md +62 -0
- package/docs/Header.md +1 -0
- package/docs/Logging.md +129 -0
- package/docs/Outbound.md +210 -0
- package/docs/Plugins.md +372 -0
- package/docs/Results.md +7 -0
- package/docs/Transaction.md +135 -0
- package/docs/Tutorial.md +183 -0
- package/docs/deprecated/access.md +3 -0
- package/docs/deprecated/backscatterer.md +9 -0
- package/docs/deprecated/connect.rdns_access.md +53 -0
- package/docs/deprecated/data.headers.md +3 -0
- package/docs/deprecated/data.nomsgid.md +7 -0
- package/docs/deprecated/data.noreceived.md +11 -0
- package/docs/deprecated/data.rfc5322_header_checks.md +11 -0
- package/docs/deprecated/dkim_sign.md +97 -0
- package/docs/deprecated/dkim_verify.md +28 -0
- package/docs/deprecated/dnsbl.md +80 -0
- package/docs/deprecated/dnswl.md +73 -0
- package/docs/deprecated/lookup_rdns.strict.md +67 -0
- package/docs/deprecated/mail_from.access.md +52 -0
- package/docs/deprecated/mail_from.blocklist.md +18 -0
- package/docs/deprecated/mail_from.nobounces.md +8 -0
- package/docs/deprecated/rcpt_to.access.md +53 -0
- package/docs/deprecated/rcpt_to.blocklist.md +18 -0
- package/docs/deprecated/rcpt_to.routes.md +3 -0
- package/docs/deprecated/rdns.regexp.md +30 -0
- package/docs/plugins/aliases.md +3 -0
- package/docs/plugins/auth/auth_bridge.md +34 -0
- package/docs/plugins/auth/auth_ldap.md +4 -0
- package/docs/plugins/auth/auth_proxy.md +36 -0
- package/docs/plugins/auth/auth_vpopmaild.md +33 -0
- package/docs/plugins/auth/flat_file.md +40 -0
- package/docs/plugins/block_me.md +18 -0
- package/docs/plugins/data.signatures.md +11 -0
- package/docs/plugins/delay_deny.md +23 -0
- package/docs/plugins/max_unrecognized_commands.md +6 -0
- package/docs/plugins/prevent_credential_leaks.md +22 -0
- package/docs/plugins/process_title.md +42 -0
- package/docs/plugins/queue/deliver.md +3 -0
- package/docs/plugins/queue/discard.md +32 -0
- package/docs/plugins/queue/lmtp.md +24 -0
- package/docs/plugins/queue/qmail-queue.md +16 -0
- package/docs/plugins/queue/quarantine.md +87 -0
- package/docs/plugins/queue/smtp_bridge.md +32 -0
- package/docs/plugins/queue/smtp_forward.md +127 -0
- package/docs/plugins/queue/smtp_proxy.md +68 -0
- package/docs/plugins/queue/test.md +7 -0
- package/docs/plugins/rcpt_to.in_host_list.md +34 -0
- package/docs/plugins/rcpt_to.max_count.md +3 -0
- package/docs/plugins/record_envelope_addresses.md +20 -0
- package/docs/plugins/relay.md +3 -0
- package/docs/plugins/reseed_rng.md +16 -0
- package/docs/plugins/status.md +41 -0
- package/docs/plugins/tarpit.md +50 -0
- package/docs/plugins/tls.md +235 -0
- package/docs/plugins/toobusy.md +27 -0
- package/docs/plugins/xclient.md +10 -0
- package/docs/tutorials/Migrating_from_v1_to_v2.md +96 -0
- package/docs/tutorials/SettingUpOutbound.md +62 -0
- package/eslint.config.mjs +2 -0
- package/haraka.js +74 -0
- package/haraka.sh +2 -0
- package/http/html/404.html +58 -0
- package/http/html/index.html +47 -0
- package/http/package.json +21 -0
- package/line_socket.js +24 -0
- package/logger.js +322 -0
- package/outbound/client_pool.js +59 -0
- package/outbound/config.js +134 -0
- package/outbound/hmail.js +1504 -0
- package/outbound/index.js +349 -0
- package/outbound/qfile.js +93 -0
- package/outbound/queue.js +399 -0
- package/outbound/tls.js +85 -0
- package/outbound/todo.js +17 -0
- package/package.json +100 -4
- package/plugins/.eslintrc.yaml +3 -0
- package/plugins/auth/auth_base.js +261 -0
- package/plugins/auth/auth_bridge.js +20 -0
- package/plugins/auth/auth_proxy.js +227 -0
- package/plugins/auth/auth_vpopmaild.js +162 -0
- package/plugins/auth/flat_file.js +44 -0
- package/plugins/block_me.js +88 -0
- package/plugins/data.signatures.js +30 -0
- package/plugins/delay_deny.js +153 -0
- package/plugins/prevent_credential_leaks.js +61 -0
- package/plugins/process_title.js +197 -0
- package/plugins/profile.js +11 -0
- package/plugins/queue/deliver.js +12 -0
- package/plugins/queue/discard.js +27 -0
- package/plugins/queue/lmtp.js +45 -0
- package/plugins/queue/qmail-queue.js +93 -0
- package/plugins/queue/quarantine.js +133 -0
- package/plugins/queue/smtp_bridge.js +45 -0
- package/plugins/queue/smtp_forward.js +371 -0
- package/plugins/queue/smtp_proxy.js +142 -0
- package/plugins/queue/test.js +15 -0
- package/plugins/rcpt_to.host_list_base.js +65 -0
- package/plugins/rcpt_to.in_host_list.js +56 -0
- package/plugins/record_envelope_addresses.js +17 -0
- package/plugins/reseed_rng.js +7 -0
- package/plugins/status.js +274 -0
- package/plugins/tarpit.js +45 -0
- package/plugins/tls.js +164 -0
- package/plugins/toobusy.js +47 -0
- package/plugins/xclient.js +124 -0
- package/plugins.js +605 -0
- package/run_tests +11 -0
- package/server.js +827 -0
- package/smtp_client.js +504 -0
- package/test/.eslintrc.yaml +11 -0
- package/test/config/auth_flat_file.ini +5 -0
- package/test/config/block_me.recipient +1 -0
- package/test/config/block_me.senders +1 -0
- package/test/config/dhparams.pem +8 -0
- package/test/config/host_list +2 -0
- package/test/config/outbound_tls_cert.pem +1 -0
- package/test/config/outbound_tls_key.pem +1 -0
- package/test/config/plugins +7 -0
- package/test/config/smtp.ini +11 -0
- package/test/config/smtp_forward.ini +30 -0
- package/test/config/tls/example.com/_.example.com.key +28 -0
- package/test/config/tls/example.com/example.com.crt +25 -0
- package/test/config/tls/haraka.local.pem +51 -0
- package/test/config/tls.ini +45 -0
- package/test/config/tls_cert.pem +21 -0
- package/test/config/tls_key.pem +28 -0
- package/test/connection.js +820 -0
- package/test/fixtures/haproxy_allowed/config/connection.ini +3 -0
- package/test/fixtures/haproxy_disabled/config/connection.ini +3 -0
- package/test/fixtures/haproxy_untrusted/config/connection.ini +3 -0
- package/test/fixtures/line_socket.js +21 -0
- package/test/fixtures/todo_qfile.txt +0 -0
- package/test/fixtures/util_hmailitem.js +156 -0
- package/test/installation/config/test-plugin-flat +1 -0
- package/test/installation/config/test-plugin.ini +10 -0
- package/test/installation/config/tls.ini +1 -0
- package/test/installation/node_modules/load_first/index.js +5 -0
- package/test/installation/node_modules/load_first/package.json +11 -0
- package/test/installation/node_modules/test-plugin/config/test-plugin-flat +1 -0
- package/test/installation/node_modules/test-plugin/config/test-plugin.ini +9 -0
- package/test/installation/node_modules/test-plugin/package.json +5 -0
- package/test/installation/node_modules/test-plugin/test-plugin.js +5 -0
- package/test/installation/plugins/base_plugin.js +3 -0
- package/test/installation/plugins/folder_plugin/index.js +3 -0
- package/test/installation/plugins/folder_plugin/package.json +11 -0
- package/test/installation/plugins/inherits.js +7 -0
- package/test/installation/plugins/load_first.js +3 -0
- package/test/installation/plugins/plugin.js +1 -0
- package/test/installation/plugins/tls.js +3 -0
- package/test/logger.js +217 -0
- package/test/loud/config/dhparams.pem +0 -0
- package/test/loud/config/tls/goobered.pem +45 -0
- package/test/loud/config/tls.ini +43 -0
- package/test/mail_specimen/base64-root-part.txt +23 -0
- package/test/mail_specimen/varied-fold-lengths-preserve-data.txt +283 -0
- package/test/outbound/bounce_net_errors.js +133 -0
- package/test/outbound/bounce_rfc3464.js +226 -0
- package/test/outbound/hmail.js +210 -0
- package/test/outbound/index.js +385 -0
- package/test/outbound/qfile.js +124 -0
- package/test/outbound/queue.js +325 -0
- package/test/plugins/auth/auth_base.js +620 -0
- package/test/plugins/auth/auth_bridge.js +80 -0
- package/test/plugins/auth/auth_vpopmaild.js +81 -0
- package/test/plugins/auth/flat_file.js +123 -0
- package/test/plugins/block_me.js +141 -0
- package/test/plugins/data.signatures.js +111 -0
- package/test/plugins/delay_deny.js +262 -0
- package/test/plugins/prevent_credential_leaks.js +174 -0
- package/test/plugins/process_title.js +141 -0
- package/test/plugins/queue/deliver.js +98 -0
- package/test/plugins/queue/discard.js +78 -0
- package/test/plugins/queue/lmtp.js +137 -0
- package/test/plugins/queue/qmail-queue.js +98 -0
- package/test/plugins/queue/quarantine.js +80 -0
- package/test/plugins/queue/smtp_bridge.js +152 -0
- package/test/plugins/queue/smtp_forward.js +1023 -0
- package/test/plugins/queue/smtp_proxy.js +138 -0
- package/test/plugins/rcpt_to.host_list_base.js +102 -0
- package/test/plugins/rcpt_to.in_host_list.js +186 -0
- package/test/plugins/record_envelope_addresses.js +66 -0
- package/test/plugins/reseed_rng.js +34 -0
- package/test/plugins/status.js +207 -0
- package/test/plugins/tarpit.js +90 -0
- package/test/plugins/tls.js +86 -0
- package/test/plugins/toobusy.js +198 -0
- package/test/plugins/xclient.js +119 -0
- package/test/plugins.js +230 -0
- package/test/queue/1507509981169_1507509981169_0_61403_e0Y0Ym_1_fixed +0 -0
- package/test/queue/1507509981169_1507509981169_0_61403_e0Y0Ym_1_haraka +0 -0
- package/test/queue/1508269674999_1508269674999_0_34002_socVUF_1_haraka +0 -0
- package/test/queue/1508455115683_1508455115683_0_90253_9Q4o4V_1_haraka +0 -0
- package/test/queue/zero-length +0 -0
- package/test/server.js +1012 -0
- package/test/smtp_client.js +1303 -0
- package/test/tls_socket.js +321 -0
- package/test/transaction.js +554 -0
- package/tls_socket.js +771 -0
- package/transaction.js +267 -0
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
# queue/smtp_forward
|
|
2
|
+
|
|
3
|
+
==================
|
|
4
|
+
|
|
5
|
+
This plugin delivers to another mail server. This is a common setup when you want to have a mail server with a solid pedigree of outbound delivery to other hosts, and inbound delivery to users.
|
|
6
|
+
|
|
7
|
+
In comparison to `queue/smtp_proxy`, this plugin waits until queue time to attempt the ongoing connection. This can be a benefit in reducing connections to your inbound mail server when you have content filtering (such as spamassassin) enabled. A possible downside is that it also delays recipient validation that the ongoing mail server may provide until queue time.
|
|
8
|
+
|
|
9
|
+
## Configuration
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
Configuration is stored in smtp_forward.ini in the following keys:
|
|
14
|
+
|
|
15
|
+
- enable_outbound=[true]
|
|
16
|
+
|
|
17
|
+
SMTP forward outbound messages (set to false to enable Haraka's separate Outbound mail routing (MX based delivery)).
|
|
18
|
+
|
|
19
|
+
- host=HOST
|
|
20
|
+
|
|
21
|
+
The host to connect to.
|
|
22
|
+
|
|
23
|
+
- port=PORT
|
|
24
|
+
|
|
25
|
+
The port to connect to. Default: 25
|
|
26
|
+
|
|
27
|
+
- connect_timeout=SECONDS
|
|
28
|
+
|
|
29
|
+
The maximum amount of time to wait when creating a new connection to the host. Default: 30 seconds.
|
|
30
|
+
|
|
31
|
+
- timeout=SECONDS
|
|
32
|
+
|
|
33
|
+
The amount of seconds to let a backend connection live idle in the connection pool. This should always be less than the global plugin timeout, which should in turn be less than the connection timeout.
|
|
34
|
+
|
|
35
|
+
- max_connections=NUMBER
|
|
36
|
+
|
|
37
|
+
Maximum number of connections at any given time. Default: 1000
|
|
38
|
+
|
|
39
|
+
- enable_tls=[true]
|
|
40
|
+
|
|
41
|
+
Enable opportunistic TLS with the forward host via `STARTTLS` (if the host advertises it). This plugin does not work with implicit SMTP over TLS.
|
|
42
|
+
|
|
43
|
+
- auth_type=[plain\|login]
|
|
44
|
+
|
|
45
|
+
Enable PLAIN or LOGIN SMTP AUTH. This is required to enable AUTH.
|
|
46
|
+
|
|
47
|
+
- auth_user=USERNAME
|
|
48
|
+
|
|
49
|
+
SMTP AUTH username to use.
|
|
50
|
+
|
|
51
|
+
- auth_pass=PASSWORD
|
|
52
|
+
|
|
53
|
+
SMTP AUTH password to use.
|
|
54
|
+
|
|
55
|
+
- queue
|
|
56
|
+
|
|
57
|
+
Which queue plugin to use. Default: undefined. The default bahavior is to use smtp_forward for inbound connections and outbound for relaying connections. This option is used for complex mail routes.
|
|
58
|
+
|
|
59
|
+
- check_sender=false
|
|
60
|
+
|
|
61
|
+
Requires that sender domains defined in smtp_forward.ini (see Per-Domain below) have relaying privileges. This is a form of spoof prevention and assumes that any mail clients have relaying or AUTH privileges. This is usually the case.
|
|
62
|
+
|
|
63
|
+
- check_recipient=false
|
|
64
|
+
|
|
65
|
+
By default, Haraka accepts no emails until a recipient plugin has been configured to accept mails for a domain. The simplest common case is the in_host_list plugin with a list of domains in config/host_list. An alternative is to set `check_recipient=true` and list each domain in a definition block in smtp_forward.ini (see Per-Domain Configuration). An example for two domains:
|
|
66
|
+
|
|
67
|
+
[example.com]
|
|
68
|
+
[example.net]
|
|
69
|
+
|
|
70
|
+
- [tls]
|
|
71
|
+
|
|
72
|
+
Client STARTTLS options are assembled by merging:
|
|
73
|
+
|
|
74
|
+
1. `tls.ini` `[main]` — the global Haraka TLS config
|
|
75
|
+
2. `smtp_forward.ini` `[tls]` — overrides. Anything set here wins.
|
|
76
|
+
|
|
77
|
+
Example `smtp_forward.ini` `[tls]` section:
|
|
78
|
+
|
|
79
|
+
[tls]
|
|
80
|
+
rejectUnauthorized=true
|
|
81
|
+
minVersion=TLSv1.2
|
|
82
|
+
no_tls_hosts[]=10.0.0.5
|
|
83
|
+
|
|
84
|
+
Per-domain `enable_tls=false` still disables STARTTLS for that backend. Per-domain TLS cipher/cert overrides are not currently supported.
|
|
85
|
+
|
|
86
|
+
Changes to `tls.ini` require a Haraka restart to apply to the forward path; changes to `smtp_forward.ini` are picked up by the existing reload hook.
|
|
87
|
+
|
|
88
|
+
# Per-Domain Configuration
|
|
89
|
+
|
|
90
|
+
More specific forward routes for domains can be defined. The domain is chosen based on the value of the `domain_selector` config variable.
|
|
91
|
+
|
|
92
|
+
When `domain_selector` is set to `rcpt_to` (the default), more specific routes are only honored for SMTP connections with a single recipient or SMTP connections where every recipient host is identical.
|
|
93
|
+
|
|
94
|
+
When `domain_selector` is set to `mail_from`, it first searches for configuration using the complete email address, falls back to the domain if not found, then to main configuration.
|
|
95
|
+
|
|
96
|
+
enable_outbound can be set or unset on a per-domain level to enable or disable forwarding for specific domains.
|
|
97
|
+
|
|
98
|
+
# default SMTP host
|
|
99
|
+
host=1.2.3.4
|
|
100
|
+
# auth_type=plain
|
|
101
|
+
# auth_user=user
|
|
102
|
+
# auth_user=pass
|
|
103
|
+
|
|
104
|
+
[example1.com]
|
|
105
|
+
host=1.2.3.5
|
|
106
|
+
# auth_type=plain
|
|
107
|
+
# auth_user=user
|
|
108
|
+
# auth_pass=pass
|
|
109
|
+
|
|
110
|
+
[email@example1.com]
|
|
111
|
+
host=1.2.3.5
|
|
112
|
+
# auth_type=plain
|
|
113
|
+
# auth_user=user
|
|
114
|
+
# auth_pass=pass
|
|
115
|
+
|
|
116
|
+
[example2.com]
|
|
117
|
+
host=1.2.3.5
|
|
118
|
+
|
|
119
|
+
[example3.com]
|
|
120
|
+
host=1.2.3.6
|
|
121
|
+
|
|
122
|
+
[example4.com]
|
|
123
|
+
enable\_outbound=false
|
|
124
|
+
|
|
125
|
+
# Split host forward routing
|
|
126
|
+
|
|
127
|
+
When an incoming email transaction has multiple recipients with different forward routes, recipients to subsequent forward routes are deferred. Example: an incoming email transaction has recipients user@example1.com, user@example2.com, and user@example3.com. The first two recipients will be accepted (they share the same forward destination) and the latter will be deferred. It will arrive in a future delivery attempt by the remote.
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
# queue/smtp_proxy
|
|
2
|
+
|
|
3
|
+
================
|
|
4
|
+
|
|
5
|
+
This plugin delivers to another mail server. This is a common setup when you want to have a mail server with a solid pedigree of outbound delivery to other hosts, and inbound delivery to users.
|
|
6
|
+
|
|
7
|
+
In comparison to `queue/smtp_forward`, this plugin makes a connection at MAIL FROM time to the ongoing SMTP server. This can be a benefit in that you get any SMTP-time filtering that the ongoing server provides, in particular one important facility to some setups is recipient filtering.
|
|
8
|
+
|
|
9
|
+
Be aware that other than connect and HELO-time filtering, you will have as many connections to your ongoing SMTP server as you have to Haraka.
|
|
10
|
+
|
|
11
|
+
## Configuration
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
Configuration is stored in smtp_proxy.ini in the following keys:
|
|
16
|
+
|
|
17
|
+
- enable_outbound=[true]
|
|
18
|
+
|
|
19
|
+
SMTP proxy outbound messages (set to false to enable Haraka's
|
|
20
|
+
separate Outbound mail routing (MX based delivery)).
|
|
21
|
+
|
|
22
|
+
- host=HOST
|
|
23
|
+
|
|
24
|
+
The host to connect to.
|
|
25
|
+
|
|
26
|
+
- port=PORT
|
|
27
|
+
|
|
28
|
+
The port to connect to.
|
|
29
|
+
|
|
30
|
+
- connect_timeout=SECONDS
|
|
31
|
+
|
|
32
|
+
The maximum amount of time to wait when creating a new connection
|
|
33
|
+
to the host. Default if unspecified is 30 seconds.
|
|
34
|
+
|
|
35
|
+
- timeout=SECONDS
|
|
36
|
+
|
|
37
|
+
The amount of seconds to let a backend connection live idle in the
|
|
38
|
+
proxy pool. This should always be less than the global plugin timeout,
|
|
39
|
+
which should in turn be less than the connection timeout.
|
|
40
|
+
|
|
41
|
+
- max_connections=NUMBER
|
|
42
|
+
|
|
43
|
+
Maximum number of connections to create at any given time.
|
|
44
|
+
|
|
45
|
+
- enable_tls=[true|yes|1]
|
|
46
|
+
|
|
47
|
+
Enable opportunistic TLS with the forward host via `STARTTLS` (if the host advertises it).
|
|
48
|
+
|
|
49
|
+
- auth_type=[plain|login]
|
|
50
|
+
|
|
51
|
+
Enable PLAIN or LOGIN SMTP AUTH. This is required to enable AUTH.
|
|
52
|
+
|
|
53
|
+
- auth_user=USERNAME
|
|
54
|
+
|
|
55
|
+
SMTP AUTH username to use.
|
|
56
|
+
|
|
57
|
+
- auth_pass=PASSWORD
|
|
58
|
+
|
|
59
|
+
SMTP AUTH password to use.
|
|
60
|
+
|
|
61
|
+
- [tls]
|
|
62
|
+
|
|
63
|
+
Client STARTTLS options are assembled by merging:
|
|
64
|
+
|
|
65
|
+
1. `tls.ini` `[main]` — the global Haraka TLS config.
|
|
66
|
+
2. `smtp_proxy.ini` `[tls]` — overrides. Anything set here wins.
|
|
67
|
+
|
|
68
|
+
Changes to `tls.ini` require a Haraka restart to apply to the proxy path; changes to `smtp_proxy.ini` are picked up by the existing reload hook.
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
# queue/test
|
|
2
|
+
|
|
3
|
+
This plugin saves incoming E-Mail to your temporary directory, as `mail_{message_id}.eml`, where message_id is a UUID.
|
|
4
|
+
|
|
5
|
+
This plugin can be useful to quickly test if you're able to receive incoming E-Mail and just dump them to disk.
|
|
6
|
+
|
|
7
|
+
The temporary directory is determined using Node's [`os.tmpdir()`](https://nodejs.org/api/os.html#ostmpdir), which respects standard platform configurations.
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# rcpt_to.in_host_list
|
|
2
|
+
|
|
3
|
+
This plugin is the mainstay of an inbound Haraka server. It should list the
|
|
4
|
+
domains that are local to the host. Mails that have RCPT TO not matching
|
|
5
|
+
a host in the given list will be passed onto other rcpt hooks. If no rcpt
|
|
6
|
+
hook accepts the connection, it will be rejected.
|
|
7
|
+
|
|
8
|
+
## Configuration
|
|
9
|
+
|
|
10
|
+
- host_list
|
|
11
|
+
|
|
12
|
+
Specifies the list of hosts that are local to this server.
|
|
13
|
+
|
|
14
|
+
- host_list_regex
|
|
15
|
+
|
|
16
|
+
Specifies the list of regexes that are local to this server. Note
|
|
17
|
+
all these regexes are anchored with ^regex$. One can choose not to
|
|
18
|
+
anchor with .\*. There is the potential for bad regexes to be
|
|
19
|
+
too permissive if we don't anchor.
|
|
20
|
+
|
|
21
|
+
- host_list.anti_spoof
|
|
22
|
+
|
|
23
|
+
When enabled, this will cause Haraka to reject any MAIL FROM where
|
|
24
|
+
the host appears within the host list but the connected host is not
|
|
25
|
+
a relay, e.g. connection.relaying is not set either by SMTP AUTH or
|
|
26
|
+
another plugin like 'relay'.
|
|
27
|
+
|
|
28
|
+
## Relaying
|
|
29
|
+
|
|
30
|
+
This plugin checks to see if the MAIL FROM domain is local. When
|
|
31
|
+
connection.relaying is detected (haraka -h relay) and the MAIL FROM domain is
|
|
32
|
+
local, this plugin will vouch for any RCPT. This limits relaying users to
|
|
33
|
+
sending from local domains, which is much safer than letting relay clients
|
|
34
|
+
send from any domain.
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# record_envelope_addresses
|
|
2
|
+
|
|
3
|
+
This plugin adds two new header lines.
|
|
4
|
+
|
|
5
|
+
- X-Envelope-To: the envelope RCPT TO address
|
|
6
|
+
- X-Envelope-From: the envelope MAIL FROM address
|
|
7
|
+
|
|
8
|
+
It is useful if you need to know the exact addresses used to send an email, e.g. when
|
|
9
|
+
the email was sent to you as BCC or if it is a newsletter. In both cases the recipient
|
|
10
|
+
address is normally not recorded in the headers.
|
|
11
|
+
|
|
12
|
+
## Caveats
|
|
13
|
+
|
|
14
|
+
If you enable this plugin you may introduce a possible information leak, i.e. disclosure
|
|
15
|
+
of BCC recipients. So you never want to use this on an outgoing mail server and maybe also
|
|
16
|
+
not if this server is used as a relay.
|
|
17
|
+
|
|
18
|
+
## Configuration
|
|
19
|
+
|
|
20
|
+
This plugin has no configuration.
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# reseed_rng
|
|
2
|
+
|
|
3
|
+
Reseeds `Math.random()` in each cluster worker at start-up using
|
|
4
|
+
`crypto.randomBytes(256)`. Without this, workers forked at nearly the
|
|
5
|
+
same time can end up with correlated PRNG state, which can produce
|
|
6
|
+
UUID collisions and other "this should be impossible" bugs.
|
|
7
|
+
|
|
8
|
+
The plugin relies on [seedrandom](https://www.npmjs.com/package/seedrandom)
|
|
9
|
+
being loaded so that `Math.seedrandom()` is available.
|
|
10
|
+
|
|
11
|
+
Anyone running with `nodes=...` in `smtp.ini` (i.e. cluster mode) should
|
|
12
|
+
consider enabling this plugin.
|
|
13
|
+
|
|
14
|
+
## Configuration
|
|
15
|
+
|
|
16
|
+
No configuration.
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# Status
|
|
2
|
+
|
|
3
|
+
This plugin allows to get internal status of queues and pools with SMTP commands sent from localhost.
|
|
4
|
+
|
|
5
|
+
## Communication
|
|
6
|
+
|
|
7
|
+
- **Request** → `STATUS <CMD> [param1] [param2]....`
|
|
8
|
+
- **Response** ← _<SMTP code 211 or 500><space><json encoded response>\r\n_
|
|
9
|
+
|
|
10
|
+
### Example
|
|
11
|
+
|
|
12
|
+
```
|
|
13
|
+
< 220 example.com ESMTP Haraka ready
|
|
14
|
+
> STATUS QUEUE INSPECT
|
|
15
|
+
< 211 {"delivery_queue":[],"temp_fail_queue":[]}
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## Available commands list
|
|
19
|
+
|
|
20
|
+
- `STATUS POOL LIST` - map of active outbound connection pools, keyed by `host:port`
|
|
21
|
+
- `STATUS QUEUE STATS` - queue statistics in format `"<in_progress>/<delivery_queue length>/<temp_fail_queue length>"`
|
|
22
|
+
- `STATUS QUEUE LIST` - list of queue files on disk with _uuid, domain, mail_from, rcpt_to_ attributes
|
|
23
|
+
- `STATUS QUEUE INSPECT` - returns merged content of `outbound.delivery_queue` and `outbound.temp_fail_queue` across all workers
|
|
24
|
+
- `STATUS QUEUE DISCARD file` - stop delivering email file
|
|
25
|
+
- `STATUS QUEUE PUSH file` - try to re-deliver email immediately
|
|
26
|
+
|
|
27
|
+
## Notes
|
|
28
|
+
|
|
29
|
+
### Live data only
|
|
30
|
+
|
|
31
|
+
`POOL LIST`, `QUEUE STATS`, and `QUEUE INSPECT` reflect live in-memory state. They show only messages currently being processed or waiting in the retry queue. `QUEUE LIST` reads queue files from disk and may show messages that have already been delivered if they haven't been cleaned up yet.
|
|
32
|
+
|
|
33
|
+
### Cluster mode
|
|
34
|
+
|
|
35
|
+
In cluster mode, `POOL LIST`, `QUEUE STATS`, and `QUEUE INSPECT` aggregate results from all worker processes into a single response:
|
|
36
|
+
|
|
37
|
+
- `POOL LIST` — pool maps from all workers are merged into one object
|
|
38
|
+
- `QUEUE STATS` — counters from all workers are summed into a single `"N/N/N"` string
|
|
39
|
+
- `QUEUE INSPECT` — `delivery_queue` and `temp_fail_queue` arrays from all workers are concatenated
|
|
40
|
+
|
|
41
|
+
`QUEUE LIST` always runs on the master process since it reads shared queue files from disk.
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# tarpit
|
|
2
|
+
|
|
3
|
+
This plugin is designed to introduce deliberate delays on the response
|
|
4
|
+
of every hook in order to slow down a connection. It has no
|
|
5
|
+
configuration and is designed to be used only by other plugins.
|
|
6
|
+
|
|
7
|
+
It must be loaded early in config/plugins (e.g. before any plugins
|
|
8
|
+
that accept recipients or that return OK) but must be loaded _after_
|
|
9
|
+
any plugins that wish to use it.
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
To use this plugin in another plugin set:
|
|
14
|
+
|
|
15
|
+
connection.notes.tarpit = <seconds to delay>;
|
|
16
|
+
|
|
17
|
+
or
|
|
18
|
+
|
|
19
|
+
connection.transaction.notes.tarpit = <seconds to delay>;
|
|
20
|
+
|
|
21
|
+
## Configuration
|
|
22
|
+
|
|
23
|
+
The configuration file for tarpit is config/tarpit.ini.
|
|
24
|
+
|
|
25
|
+
- hooks_to_delay - a list of hooks to delay at. This setting can be used to
|
|
26
|
+
override the default list in the plugin. For example, if you notice that
|
|
27
|
+
malware is disconnecting after delaying rcpt_ok, you can remove just that
|
|
28
|
+
hook from the list:
|
|
29
|
+
|
|
30
|
+
hooks_to_delay=connect,helo,ehlo,mail,rcpt,data,data_post,queue,unrecognized_command,vrfy,noop,rset,quit
|
|
31
|
+
|
|
32
|
+
## Plugin Timeout
|
|
33
|
+
|
|
34
|
+
config/tarpit.timeout (Default: 0)
|
|
35
|
+
|
|
36
|
+
All Haraka plugins can configure a _name_.timeout file. The timeout specifies
|
|
37
|
+
how long Haraka lets the plugin do nothing before it times out. When zero,
|
|
38
|
+
there is no timeout. When non-zero and _seconds to delay_ is longer than
|
|
39
|
+
tarpit.timeout (default: 1s), you'll get errors like this in your log files:
|
|
40
|
+
|
|
41
|
+
[core] Plugin tarpit timed out on hook rcpt - make sure it calls the callback
|
|
42
|
+
[core] Plugin tarpit timed out on hook quit - make sure it calls the callback
|
|
43
|
+
|
|
44
|
+
The solution is to set the contents of config/tarpit.timeout to zero or
|
|
45
|
+
**seconds to delay** + 1.
|
|
46
|
+
|
|
47
|
+
## Logging
|
|
48
|
+
|
|
49
|
+
When tarpitting a command it will log 'tarpitting response for Ns' to
|
|
50
|
+
the INFO facility where N is the number of seconds.
|
|
@@ -0,0 +1,235 @@
|
|
|
1
|
+
# tls
|
|
2
|
+
|
|
3
|
+
This plugin enables the use of TLS (via `STARTTLS`) in Haraka.
|
|
4
|
+
|
|
5
|
+
For this plugin to work you must have SSL certificates installed correctly.
|
|
6
|
+
|
|
7
|
+
Haraka has [SNI](https://en.wikipedia.org/wiki/Server_Name_Indication) support. When the remote MUA/MTA presents a servername during the TLS handshake and a TLS certificate with that Common Name matches, that certificate will be presented. If no match is found, the default certificate (see Certificate Files) is presented.
|
|
8
|
+
|
|
9
|
+
## Certificate Files
|
|
10
|
+
|
|
11
|
+
Defaults settings are shown and can be overridden in `config/tls.ini`.
|
|
12
|
+
|
|
13
|
+
```ini
|
|
14
|
+
key=tls_key.pem
|
|
15
|
+
cert=tls_cert.pem
|
|
16
|
+
dhparam=dhparams.pem
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Certificate Directory
|
|
20
|
+
|
|
21
|
+
If the directory `config/tls` exists, files within the directory are PEM encoded TLS files in one of two formats: bundles or Wild Wild West.
|
|
22
|
+
|
|
23
|
+
### Certificate bundles
|
|
24
|
+
|
|
25
|
+
Generate PEM bundles in The Usual Way[TM] by concatenating the key, certificate, and CA/chain certs in that order. Example:
|
|
26
|
+
|
|
27
|
+
```sh
|
|
28
|
+
cat example.com.key example.com.crt ca-int.crt > haraka/config/tls/example.com.pem
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
An example [acme.sh](https://acme.sh) deployment [script](https://github.com/msimerson/Mail-Toaster-6/blob/master/provision/letsencrypt.sh) installs [Let's Encrypt](https://letsencrypt.org) certificate bundles to the Haraka `config/tls`directory.
|
|
32
|
+
|
|
33
|
+
### Wild Wild West
|
|
34
|
+
|
|
35
|
+
PEM encoded TLS certificates and keys can be stored in files in `config/tls`. The certificate loader is recursive, so TLS files can be in subdirs like `config/tls/mx1.example.com`. The certificate names are parsed from the 1st cert in each file and indexed by the certs Common Name(s). Subject Alternate Names are supported. The file name containing the certificates does _not_ matter. Additional certificates within each file are presumed to be CA chain (intermediate) certificates.
|
|
36
|
+
|
|
37
|
+
If the TLS key is stored in the same file as the matching certificate, then the name of the file does not matter. If the TLS key is alone in a file, the file MUST be named with the keys Common Name. The file extension does not matter, `.pem` and `.key` are common. If the key is used for multiple CNs, the key must be stored in a file name matching each CN. Examples of working TLS key/cert file pairs for the Common Name mx1.example.com:
|
|
38
|
+
|
|
39
|
+
1. certificate bundle (see above), key & cert in same file
|
|
40
|
+
- config/tls/mx1.example.com.pem (recommended)
|
|
41
|
+
- config/tls/any-unique-name.pem (CN is extracted from 1st cert)
|
|
42
|
+
2. files in TLS dir
|
|
43
|
+
- config/tls/mx1.example.com.crt
|
|
44
|
+
- config/tls/mx1.example.com.key
|
|
45
|
+
3. files in subdir
|
|
46
|
+
- config/tls/example.com/mx1.cert
|
|
47
|
+
- config/tls/example.com/mx1.example.com.key
|
|
48
|
+
4. wildcard bundle on Windows platform (\* is not allowed in file names)
|
|
49
|
+
- config/tls/\_.example.com.pem
|
|
50
|
+
|
|
51
|
+
## Purchased Certificate
|
|
52
|
+
|
|
53
|
+
For purchased certificate, append any intermediate/chained/ca-cert files to the certificate in this order:
|
|
54
|
+
|
|
55
|
+
1. The CA signed SSL cert
|
|
56
|
+
2. Any intermediate certificates
|
|
57
|
+
3. The CA root certificate
|
|
58
|
+
|
|
59
|
+
See also [Setting Up TLS](https://github.com/haraka/Haraka/wiki/Setting-up-TLS-with-CA-certificates)
|
|
60
|
+
|
|
61
|
+
## Self Issued (unsigned) Certificate
|
|
62
|
+
|
|
63
|
+
Create a certificate and key file in the config directory with the following command:
|
|
64
|
+
|
|
65
|
+
openssl req -x509 -nodes -days 2190 -newkey rsa:2048 \
|
|
66
|
+
-keyout config/tls_key.pem -out config/tls_cert.pem
|
|
67
|
+
|
|
68
|
+
You will be prompted to provide details of your organization. Make sure the
|
|
69
|
+
Common Name is set to your servers Fully Qualified Domain Name, which should
|
|
70
|
+
be the same as the contents of your `config/me` file.
|
|
71
|
+
|
|
72
|
+
## Configuration
|
|
73
|
+
|
|
74
|
+
The following settings can be specified in `config/tls.ini`.
|
|
75
|
+
|
|
76
|
+
### key
|
|
77
|
+
|
|
78
|
+
Specifies an alternative location for the key file. For multiple keys, use `key[]=` assignment for each. Non-absolute paths are relative to the `config/` directory.
|
|
79
|
+
|
|
80
|
+
To configure a single key and a cert chain, located in the `config/`
|
|
81
|
+
directory, use the following in `tls.ini`:
|
|
82
|
+
|
|
83
|
+
```ini
|
|
84
|
+
key=example.com.key.pem
|
|
85
|
+
cert=example.com.crt-chain.pem
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
To use multiple pairs of key and cert chain files outside of the haraka
|
|
89
|
+
`config/` directory, configure instead:
|
|
90
|
+
|
|
91
|
+
```ini
|
|
92
|
+
key[]=/etc/ssl/private/example.com.rsa.key.pem
|
|
93
|
+
cert[]=/etc/ssl/private/example.com.rsa.crt-chain.pem
|
|
94
|
+
key[]=/etc/ssl/private/example.com.ecdsa.key.pem
|
|
95
|
+
cert[]=/etc/ssl/private/example.com.ecdsa.crt-chain.pem
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
### cert
|
|
99
|
+
|
|
100
|
+
Specifies the location(s) for the certificate chain file. For multiple certificate chains, use `cert[]=` assignment for each. Non-absolute paths are relative to the `config/` directory. See the description of the `key` parameter for specific use.
|
|
101
|
+
|
|
102
|
+
### no_tls_hosts
|
|
103
|
+
|
|
104
|
+
If needed, add this section to the `config/tls.ini` file and list any IP ranges that have broken TLS hosts. Ex:
|
|
105
|
+
|
|
106
|
+
```ini
|
|
107
|
+
[no_tls_hosts]
|
|
108
|
+
192.168.1.3
|
|
109
|
+
172.16.0.0/16
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
Note: `[no_tls_hosts]` section applies to inbound only. For outbound mail, this feature is implemented as an array like `force_tls_hosts`:
|
|
113
|
+
|
|
114
|
+
```ini
|
|
115
|
+
[outbound]
|
|
116
|
+
no_tls_hosts[]=192.168.1.3
|
|
117
|
+
no_tls_hosts[]=172.16.0.0/16
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
The [Node.js TLS](http://nodejs.org/api/tls.html) page has additional information about the following options.
|
|
121
|
+
|
|
122
|
+
### no_starttls_ports
|
|
123
|
+
|
|
124
|
+
An array of incoming ports on which Haraka will not advertise STARTTLS capability.
|
|
125
|
+
|
|
126
|
+
```ini
|
|
127
|
+
no_starttls_ports[]=2525
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
### force_tls_hosts
|
|
131
|
+
|
|
132
|
+
For known good TLS hosts, it's possible to force that the outbound mailer will only connect via secure sockets. This makes Haraka use _forced TLS_ instead of _opportunistic TLS_. For forced TLS, the STARTTLS upgrade must succeed with a valid certificate (overriding `rejectUnauthorized`). The list is matched both against the host (MX record or `nexthop` in `relay_dest_domains.ini`), and the domain name of the email address.
|
|
133
|
+
|
|
134
|
+
Note: unlike `no_tls_hosts`, this feature is implemented as an array:
|
|
135
|
+
|
|
136
|
+
```ini
|
|
137
|
+
[outbound]
|
|
138
|
+
force_tls_hosts[]=172.17.123.1
|
|
139
|
+
force_tls_hosts[]=172.17.124.0/24
|
|
140
|
+
force_tls_hosts[]=mx.example.org
|
|
141
|
+
force_tls_hosts[]=example.com
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
### ciphers
|
|
145
|
+
|
|
146
|
+
A list of allowable ciphers to use. Example:
|
|
147
|
+
|
|
148
|
+
ciphers=EECDH+AESGCM:EDH+aRSA+AESGCM:EECDH+AES256:EDH+aRSA+AES256:EECDH+AES128:EDH+aRSA+AES128:RSA+AES:RSA+3DES
|
|
149
|
+
|
|
150
|
+
See also: [Mozilla SSL configuration generator](https://ssl-config.mozilla.org/) and the [SSLlabs Test Page](https://www.ssllabs.com/ssltest/index.html)
|
|
151
|
+
|
|
152
|
+
### minVersion
|
|
153
|
+
|
|
154
|
+
Specifies minimum allowable TLS protocol version to use. Example:
|
|
155
|
+
|
|
156
|
+
minVersion=TLSv1.1
|
|
157
|
+
|
|
158
|
+
If unset, the default is Node's `tls.DEFAULT_MIN_VERSION` constant
|
|
159
|
+
(currently `'TLSv1.2'`). Valid values: `'TLSv1.3'`, `'TLSv1.2'`,
|
|
160
|
+
`'TLSv1.1'`, `'TLSv1'`.
|
|
161
|
+
|
|
162
|
+
### honorCipherOrder
|
|
163
|
+
|
|
164
|
+
If specified, the list of configured ciphers is treated as the cipher priority from highest to lowest. The first matching cipher will be used, instead of letting the client choose. The default is `true`.
|
|
165
|
+
|
|
166
|
+
### ecdhCurve
|
|
167
|
+
|
|
168
|
+
Specifies the elliptic curve used for ECDH or ECDHE ciphers.
|
|
169
|
+
Only one curve can be specified. The default is `prime256v1` (NIST P-256).
|
|
170
|
+
|
|
171
|
+
### dhparam
|
|
172
|
+
|
|
173
|
+
Specifies the file containing the diffie-hellman parameters to use for DH or DHE key exchange. If this param or file is missing, it will be generated automatically. Default: `dhparams.pem`.
|
|
174
|
+
|
|
175
|
+
### requestCert
|
|
176
|
+
|
|
177
|
+
Whether Haraka should request a certificate from a connecting client.
|
|
178
|
+
|
|
179
|
+
requestCert=[true|false] (default: true)
|
|
180
|
+
|
|
181
|
+
### rejectUnauthorized
|
|
182
|
+
|
|
183
|
+
Reject connections from clients without a CA validated TLS certificate.
|
|
184
|
+
|
|
185
|
+
rejectUnauthorized=[true|false] (default: false)
|
|
186
|
+
|
|
187
|
+
### requireAuthorized
|
|
188
|
+
|
|
189
|
+
When `rejectUnauthorized=false`, require validated TLS certificates on just the specified ports.
|
|
190
|
+
|
|
191
|
+
```ini
|
|
192
|
+
requireAuthorized[]=465
|
|
193
|
+
;requireAuthorized[]=587
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
### secureProtocol
|
|
197
|
+
|
|
198
|
+
Legacy. Specifies the OpenSSL API function used to negotiate TLS — see
|
|
199
|
+
the [OpenSSL API page](https://www.openssl.org/docs/manmaster/ssl/ssl.html).
|
|
200
|
+
Prefer `minVersion` for modern setups; `secureProtocol` is only useful
|
|
201
|
+
to lock to a specific historic protocol.
|
|
202
|
+
|
|
203
|
+
### requestOCSP
|
|
204
|
+
|
|
205
|
+
Specifies that OCSP Stapling should be enabled, according to RFC 6066.
|
|
206
|
+
Stapling of OCSP messages allows the client to receive these along the
|
|
207
|
+
TLS session setup instead of delaying the session setup by requiring a
|
|
208
|
+
separate http connection to the OCSP server.
|
|
209
|
+
|
|
210
|
+
requestOCSP=[true|false] (default: false)
|
|
211
|
+
|
|
212
|
+
OCSP responses from the OCSP server are cached in memory for as long as
|
|
213
|
+
they are valid, and get refreshed after that time. A server restart
|
|
214
|
+
requires the OCSP responses to be fetched again upon the first client
|
|
215
|
+
connection.
|
|
216
|
+
|
|
217
|
+
## Inbound Specific Configuration
|
|
218
|
+
|
|
219
|
+
By default the above options are shared with outbound mail (either
|
|
220
|
+
using `smtp_forward`, `smtp_proxy` or plain outbound mail heading to
|
|
221
|
+
an external destination). To make these options specific to inbound
|
|
222
|
+
mail, put them under an `[inbound]` parameter group. Outbound options
|
|
223
|
+
can go under an `[outbound]` parameter group, and plugins that use
|
|
224
|
+
SMTP tls for queueing such as `smtp_proxy` and `smtp_forward` can
|
|
225
|
+
use that plugin name for plugin specific options.
|
|
226
|
+
|
|
227
|
+
## `[redis]` section
|
|
228
|
+
|
|
229
|
+
This section is mainly used to enable so called _TLS NO-GO_ feature that essentially stops advertising/using TLS if there was a problem setting it up previously. We use `no_tls|ip.add.re.ss` key to store the flag in redis. There are a couple of settings that control the behavior:
|
|
230
|
+
|
|
231
|
+
`disable_for_failed_hosts = true` to enable the feature
|
|
232
|
+
|
|
233
|
+
`disable_expiry = 604800` to set for how long we disable TLS for failing host, in seconds
|
|
234
|
+
|
|
235
|
+
`disable_inbound_expiry = 3600` same as above, but applies to inbound (aka STARTTLS capability) only
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# toobusy
|
|
2
|
+
|
|
3
|
+
This plugin will stop Haraka accepting new connections when the event loop
|
|
4
|
+
latency is too high.
|
|
5
|
+
|
|
6
|
+
See https://github.com/STRML/node-toobusy for details.
|
|
7
|
+
|
|
8
|
+
To use this plugin you must install the [`toobusy-js`](https://www.npmjs.com/package/toobusy-js)
|
|
9
|
+
module — it is not bundled with Haraka. From your Haraka install
|
|
10
|
+
directory:
|
|
11
|
+
|
|
12
|
+
```sh
|
|
13
|
+
npm install toobusy-js
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
This plugin registers on the `connect` hook with priority `-100`, so it
|
|
17
|
+
runs ahead of other `connect`/`lookup_rdns` plugins. Listing it near the
|
|
18
|
+
top of `config/plugins` is still a good idea for clarity.
|
|
19
|
+
|
|
20
|
+
## Configuration
|
|
21
|
+
|
|
22
|
+
If you wish to override the default maxLag value of 70ms then add the desired
|
|
23
|
+
value to config/toobusy.maxlag. This can be set and changed at runtime and
|
|
24
|
+
no restart is required.
|
|
25
|
+
|
|
26
|
+
Note that if you set the maxLag value to <10 then this will cause the toobusy
|
|
27
|
+
module to raise an exception which will cause Haraka to stop.
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# xclient
|
|
2
|
+
|
|
3
|
+
Implements the [XCLIENT](http://www.postfix.org/XCLIENT_README.html) protocol.
|
|
4
|
+
|
|
5
|
+
## configuration
|
|
6
|
+
|
|
7
|
+
- xclient.hosts
|
|
8
|
+
|
|
9
|
+
A list of IP addresses, one per line that should be allowed to use the
|
|
10
|
+
XCLIENT protocol. Localhost (127.0.0.1 or ::1) is allowed implicitly.
|