Haraka 3.1.0 → 3.1.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/.prettierignore +4 -0
- package/CONTRIBUTORS.md +5 -5
- package/Changes.md +69 -50
- package/Plugins.md +3 -1
- package/README.md +1 -1
- package/bin/haraka +475 -478
- package/config/outbound.ini +3 -0
- package/connection.js +1072 -1108
- package/docs/Connection.md +29 -30
- package/docs/CoreConfig.md +38 -39
- package/docs/CustomReturnCodes.md +0 -1
- package/docs/HAProxy.md +2 -2
- package/docs/Header.md +1 -1
- package/docs/Logging.md +29 -5
- package/docs/Outbound.md +93 -78
- package/docs/Plugins.md +103 -108
- package/docs/Transaction.md +49 -51
- package/docs/Tutorial.md +127 -143
- package/docs/deprecated/access.md +0 -1
- package/docs/deprecated/backscatterer.md +2 -3
- package/docs/deprecated/connect.rdns_access.md +18 -27
- package/docs/deprecated/data.headers.md +0 -1
- package/docs/deprecated/data.nomsgid.md +1 -2
- package/docs/deprecated/data.noreceived.md +1 -2
- package/docs/deprecated/data.rfc5322_header_checks.md +1 -2
- package/docs/deprecated/dkim_sign.md +13 -17
- package/docs/deprecated/dkim_verify.md +9 -17
- package/docs/deprecated/dnsbl.md +36 -38
- package/docs/deprecated/dnswl.md +41 -43
- package/docs/deprecated/lookup_rdns.strict.md +21 -34
- package/docs/deprecated/mail_from.access.md +17 -25
- package/docs/deprecated/mail_from.blocklist.md +9 -12
- package/docs/deprecated/mail_from.nobounces.md +1 -2
- package/docs/deprecated/rcpt_to.access.md +20 -27
- package/docs/deprecated/rcpt_to.blocklist.md +10 -13
- package/docs/deprecated/rcpt_to.routes.md +0 -1
- package/docs/deprecated/rdns.regexp.md +13 -15
- package/docs/plugins/aliases.md +89 -89
- package/docs/plugins/auth/auth_bridge.md +5 -7
- package/docs/plugins/auth/auth_ldap.md +11 -14
- package/docs/plugins/auth/auth_proxy.md +10 -12
- package/docs/plugins/auth/auth_vpopmaild.md +5 -6
- package/docs/plugins/auth/flat_file.md +4 -4
- package/docs/plugins/block_me.md +3 -3
- package/docs/plugins/data.signatures.md +1 -2
- package/docs/plugins/delay_deny.md +3 -4
- package/docs/plugins/max_unrecognized_commands.md +4 -4
- package/docs/plugins/prevent_credential_leaks.md +6 -6
- package/docs/plugins/process_title.md +18 -18
- package/docs/plugins/queue/deliver.md +2 -3
- package/docs/plugins/queue/discard.md +4 -4
- package/docs/plugins/queue/lmtp.md +1 -3
- package/docs/plugins/queue/qmail-queue.md +7 -9
- package/docs/plugins/queue/quarantine.md +16 -21
- package/docs/plugins/queue/rabbitmq.md +8 -11
- package/docs/plugins/queue/rabbitmq_amqplib.md +43 -39
- package/docs/plugins/queue/smtp_bridge.md +7 -10
- package/docs/plugins/queue/smtp_forward.md +42 -34
- package/docs/plugins/queue/smtp_proxy.md +30 -29
- package/docs/plugins/queue/test.md +1 -3
- package/docs/plugins/rcpt_to.in_host_list.md +6 -6
- package/docs/plugins/rcpt_to.max_count.md +1 -1
- package/docs/plugins/record_envelope_addresses.md +3 -3
- package/docs/plugins/reseed_rng.md +6 -6
- package/docs/plugins/status.md +9 -8
- package/docs/plugins/tarpit.md +7 -11
- package/docs/plugins/tls.md +12 -17
- package/docs/plugins/toobusy.md +4 -4
- package/docs/plugins/xclient.md +3 -3
- package/docs/tutorials/Migrating_from_v1_to_v2.md +19 -41
- package/docs/tutorials/SettingUpOutbound.md +6 -9
- package/endpoint.js +35 -38
- package/eslint.config.mjs +22 -19
- package/haraka.js +42 -47
- package/host_pool.js +75 -79
- package/http/html/404.html +45 -49
- package/http/html/index.html +39 -28
- package/http/package.json +2 -4
- package/line_socket.js +27 -28
- package/logger.js +182 -201
- package/outbound/client_pool.js +34 -27
- package/outbound/config.js +64 -59
- package/outbound/fsync_writestream.js +24 -25
- package/outbound/hmail.js +888 -835
- package/outbound/index.js +194 -187
- package/outbound/qfile.js +49 -52
- package/outbound/queue.js +197 -190
- package/outbound/timer_queue.js +41 -43
- package/outbound/tls.js +68 -61
- package/outbound/todo.js +11 -11
- package/package.json +38 -33
- package/plugins/.eslintrc.yaml +0 -1
- package/plugins/auth/auth_base.js +123 -127
- package/plugins/auth/auth_bridge.js +7 -7
- package/plugins/auth/auth_proxy.js +121 -126
- package/plugins/auth/auth_vpopmaild.js +84 -85
- package/plugins/auth/flat_file.js +18 -17
- package/plugins/block_me.js +31 -31
- package/plugins/data.signatures.js +13 -13
- package/plugins/delay_deny.js +65 -61
- package/plugins/prevent_credential_leaks.js +23 -23
- package/plugins/process_title.js +125 -128
- package/plugins/profile.js +5 -5
- package/plugins/queue/deliver.js +3 -3
- package/plugins/queue/discard.js +13 -14
- package/plugins/queue/lmtp.js +16 -17
- package/plugins/queue/qmail-queue.js +54 -55
- package/plugins/queue/quarantine.js +68 -70
- package/plugins/queue/rabbitmq.js +80 -87
- package/plugins/queue/rabbitmq_amqplib.js +75 -54
- package/plugins/queue/smtp_bridge.js +16 -16
- package/plugins/queue/smtp_forward.js +175 -179
- package/plugins/queue/smtp_proxy.js +69 -71
- package/plugins/queue/test.js +9 -9
- package/plugins/rcpt_to.host_list_base.js +30 -34
- package/plugins/rcpt_to.in_host_list.js +19 -19
- package/plugins/record_envelope_addresses.js +4 -4
- package/plugins/reseed_rng.js +4 -4
- package/plugins/status.js +90 -97
- package/plugins/tarpit.js +25 -14
- package/plugins/tls.js +68 -68
- package/plugins/toobusy.js +21 -23
- package/plugins/xclient.js +51 -53
- package/plugins.js +276 -293
- package/rfc1869.js +30 -35
- package/server.js +308 -299
- package/smtp_client.js +244 -228
- package/test/.eslintrc.yaml +0 -1
- package/test/connection.js +127 -134
- package/test/endpoint.js +53 -47
- package/test/fixtures/line_socket.js +12 -12
- package/test/fixtures/util_hmailitem.js +89 -85
- package/test/host_pool.js +90 -92
- package/test/installation/plugins/base_plugin.js +2 -2
- package/test/installation/plugins/folder_plugin/index.js +2 -3
- package/test/installation/plugins/inherits.js +3 -3
- package/test/installation/plugins/load_first.js +2 -3
- package/test/installation/plugins/plugin.js +1 -3
- package/test/installation/plugins/tls.js +2 -4
- package/test/logger.js +135 -116
- package/test/outbound/hmail.js +49 -35
- package/test/outbound/index.js +118 -101
- package/test/outbound/qfile.js +51 -53
- package/test/outbound_bounce_net_errors.js +84 -69
- package/test/outbound_bounce_rfc3464.js +235 -165
- package/test/plugins/auth/auth_base.js +420 -279
- package/test/plugins/auth/auth_vpopmaild.js +38 -39
- package/test/plugins/queue/smtp_forward.js +126 -104
- package/test/plugins/rcpt_to.host_list_base.js +85 -67
- package/test/plugins/rcpt_to.in_host_list.js +159 -112
- package/test/plugins/status.js +71 -64
- package/test/plugins/tls.js +37 -34
- package/test/plugins.js +97 -92
- package/test/rfc1869.js +19 -26
- package/test/server.js +293 -272
- package/test/smtp_client.js +180 -176
- package/test/tls_socket.js +62 -66
- package/test/transaction.js +159 -160
- package/tls_socket.js +331 -333
- package/transaction.js +129 -137
package/docs/plugins/aliases.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# aliases
|
|
2
2
|
|
|
3
3
|
This plugin allows one to configure aliases that may perform an action or
|
|
4
|
-
change the RCPT address in a number of ways.
|
|
4
|
+
change the RCPT address in a number of ways. All aliases are specified in
|
|
5
5
|
a JSON formatted configuration file, and must have at very least an action.
|
|
6
6
|
Any syntax error found in the JSON format config file will stop the server
|
|
7
7
|
from running.
|
|
@@ -9,137 +9,137 @@ from running.
|
|
|
9
9
|
IMPORTANT: this plugin must appear in `config/plugins` before other plugins
|
|
10
10
|
that run on hook_rcpt
|
|
11
11
|
|
|
12
|
-
WARNING: DO NOT USE THIS PLUGIN WITH queue/
|
|
12
|
+
WARNING: DO NOT USE THIS PLUGIN WITH queue/smtp_proxy.
|
|
13
13
|
|
|
14
14
|
## Configuration
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
- aliases
|
|
17
17
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
18
|
+
JSON formatted configuration file that must contain, at very least, a key
|
|
19
|
+
to match against RCPT address, and a value that is an associative array
|
|
20
|
+
with an "action" : "<action>" key, value pair. An example:
|
|
21
21
|
|
|
22
|
-
{ "test1" : { "action" : "drop" } }
|
|
22
|
+
{ "test1" : { "action" : "drop" } }
|
|
23
23
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
In the above example the "test1" alias will drop any message that matches
|
|
25
|
+
test1, or test1-_ or test1+_ (wildcard '-' or '+', see below). Actions
|
|
26
|
+
may in turn have 0 or more options listed with them like so:
|
|
27
27
|
|
|
28
28
|
{ "test3" : { "action" : "alias", "to" : "test3-works" } }
|
|
29
29
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
30
|
+
In the above example the "test3" alias has an action of "alias", and
|
|
31
|
+
a required "to" field. If this "to" field were missing the alias would
|
|
32
|
+
fail to run, and an error would be printed in the logs.
|
|
33
|
+
|
|
34
|
+
Now aliases of 'user', '@host' and 'user@host' possible:
|
|
35
|
+
|
|
36
36
|
{ "demo" : { "action" : "drop" } }
|
|
37
37
|
or
|
|
38
|
-
{ "@example.com" : { "action" : "drop" } }
|
|
38
|
+
{ "@example.com" : { "action" : "drop" } }
|
|
39
39
|
or
|
|
40
|
-
{ "demo@example.com" : { "action" : "drop" } }
|
|
40
|
+
{ "demo@example.com" : { "action" : "drop" } }
|
|
41
41
|
|
|
42
|
-
|
|
42
|
+
Aliases may also be exploded to multiple recipients:
|
|
43
43
|
|
|
44
44
|
{ "sales@example.com": { "action: "alias", "to": ["alice@example.com", "bob@example.com"] } }
|
|
45
45
|
|
|
46
|
-
|
|
46
|
+
- wildcard notation
|
|
47
47
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
48
|
+
In an effort to match some of the functionality of other alias parsers
|
|
49
|
+
we've allowed wildcard matching of the alias against the right most
|
|
50
|
+
string of a RCPT address. The characters '-' and '+' are commonly used
|
|
51
|
+
for subaddressing and this plugin has built-in support to alias the
|
|
52
|
+
"user" part of the email address.
|
|
53
53
|
|
|
54
|
-
|
|
55
|
-
|
|
54
|
+
That is, if our address were test2-testing@example.com (or
|
|
55
|
+
test2+testing@example.com), the below alias would match:
|
|
56
56
|
|
|
57
|
-
|
|
57
|
+
{ "test2" : { "action" : "drop" } }
|
|
58
58
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
59
|
+
The larger, and more specific alias, should always match first when
|
|
60
|
+
using wildcard '-' notation. So if the above RCPT were put up against
|
|
61
|
+
this alias config, it would not drop, but rather map to another
|
|
62
|
+
address:
|
|
63
63
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
64
|
+
{
|
|
65
|
+
"test2" : { "action" : "drop" },
|
|
66
|
+
"test2-testing" : { "action" : "alias", "to" : "test@foo.com" }
|
|
67
|
+
}
|
|
68
68
|
|
|
69
|
-
|
|
69
|
+
- chaining and circuits
|
|
70
70
|
|
|
71
|
-
|
|
72
|
-
|
|
71
|
+
In short, we do not allow chaining of aliases at this time. As a
|
|
72
|
+
side-effect, we enjoy protections against alias circuits.
|
|
73
73
|
|
|
74
|
-
|
|
74
|
+
- optional one line formatting
|
|
75
75
|
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
76
|
+
Any valid JSON will due, however, please consider keeping each alias
|
|
77
|
+
on its own line so that others that wish to grep the aliases file
|
|
78
|
+
have an easier time finding the full configuration for an alias.
|
|
79
79
|
|
|
80
|
-
|
|
80
|
+
- nondeterministic duplicate matches
|
|
81
81
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
82
|
+
This plugin was written with speed in mind. That means every lookup
|
|
83
|
+
hashes into the alias file for its match. While the act of doing so
|
|
84
|
+
is fast, it does mean that any duplicate alias entries will match
|
|
85
|
+
nondeterministically. That is, we cannot predict what will happen
|
|
86
|
+
here:
|
|
87
87
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
88
|
+
{
|
|
89
|
+
"coinflip" : { "action" : "alias", "to" : "heads@coin.com" },
|
|
90
|
+
"coinflip" : { "action" : "alias", "to" : "tails@coin.com" }
|
|
91
|
+
}
|
|
92
92
|
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
93
|
+
Truth be told, one result will likely always be chosen over the other,
|
|
94
|
+
so this is not exactly a coinflip. We simply cannot say what the
|
|
95
|
+
language implementation will do here, it could change tomorrow.
|
|
96
96
|
|
|
97
|
-
|
|
97
|
+
- action (required)
|
|
98
98
|
|
|
99
|
-
|
|
99
|
+
The following is a list of supported actions, and the options they require.
|
|
100
100
|
|
|
101
|
-
|
|
101
|
+
- drop
|
|
102
102
|
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
103
|
+
This action simply drops a message, while pretending everything was
|
|
104
|
+
okay to the sender. This acts much like an alias to /dev/null in
|
|
105
|
+
other servers.
|
|
106
106
|
|
|
107
|
-
|
|
107
|
+
- alias
|
|
108
108
|
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
109
|
+
This action will map the alias key to the address specified in the
|
|
110
|
+
"to" option. A note about matching in addition to the note
|
|
111
|
+
about wildcard '-' above. When we match an alias, we store the
|
|
112
|
+
hostname of the match for a shortcut substitution syntax later.
|
|
113
113
|
|
|
114
|
-
|
|
114
|
+
- to (required)
|
|
115
115
|
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
116
|
+
This option is the full address, or local part at matched hostname
|
|
117
|
+
that the RCPT address will be re-written to. For an example of
|
|
118
|
+
an alias to a full address consider the following:
|
|
119
119
|
|
|
120
|
-
|
|
120
|
+
{ "test5" : { "action" : "alias", "to" : "test5@foo.com" } }
|
|
121
121
|
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
122
|
+
This will map RCPT matches for "test5" to "test5-works@foo.com".
|
|
123
|
+
This would map "test5@somedomain.com" to "test5-works@foo.com"
|
|
124
|
+
every time. Now compare this notation with its shortcut
|
|
125
|
+
counterpart, best used when the "to" address is at the same
|
|
126
|
+
domain as the match:
|
|
127
127
|
|
|
128
|
-
|
|
128
|
+
{ "test4" : { "action" : "alias", "to" : "test4" } }
|
|
129
129
|
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
130
|
+
Clearly, this notation is more compact, but what does it do. Well,
|
|
131
|
+
mail to "test4-foo@anydomain.com" will map to "test4@anydomain.com".
|
|
132
|
+
One can see the clear benefit of using this notation with lots of
|
|
133
|
+
aliases on a single domain that map to other local parts at the
|
|
134
|
+
same domain.
|
|
135
135
|
|
|
136
136
|
### Example Configuration
|
|
137
137
|
|
|
138
138
|
{
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
139
|
+
"test1" : { "action" : "drop" },
|
|
140
|
+
"test2" : { "action" : "drop" },
|
|
141
|
+
"test3" : { "action" : "alias", "to" : "test3-works" },
|
|
142
|
+
"test4" : { "action" : "alias", "to" : "test4" },
|
|
143
|
+
"test5" : { "action" : "alias", "to" : "test5-works@success.com" },
|
|
144
|
+
"test6" : { "action" : "alias", "to" : "test6-works@success.com" }
|
|
145
145
|
}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
auth/
|
|
2
|
-
===============
|
|
1
|
+
# auth/auth_bridge
|
|
3
2
|
|
|
4
3
|
This plugin allows you to authenticate users to remote SMTP servers
|
|
5
4
|
bridging the original user and password to the remote server,
|
|
@@ -13,8 +12,7 @@ the domain is the configuration file. This plugins simply takes
|
|
|
13
12
|
the original user and password and tries to authenticate it in the
|
|
14
13
|
remote SMTP server.
|
|
15
14
|
|
|
16
|
-
Configuration
|
|
17
|
-
-------------
|
|
15
|
+
## Configuration
|
|
18
16
|
|
|
19
17
|
Configuration is stored in `config/smtp_bridge.ini` and uses the INI
|
|
20
18
|
style formatting.
|
|
@@ -26,11 +24,11 @@ The configuration of this plugin is simple:
|
|
|
26
24
|
#auth_type=
|
|
27
25
|
#priority=10
|
|
28
26
|
|
|
29
|
-
|
|
30
|
-
for example `smtp.host.tld`. This is the only setting required.
|
|
27
|
+
- host: the host where you will be authenticating and posting,
|
|
28
|
+
for example `smtp.host.tld`. This is the only setting required.
|
|
31
29
|
|
|
32
30
|
If needed you can also set
|
|
33
31
|
|
|
34
|
-
|
|
32
|
+
- port: default to empty and Haraka will use 25.
|
|
35
33
|
|
|
36
34
|
The options `auth_type` and `priority` will be used by `queue/smtp_bridge`
|
|
@@ -1,44 +1,41 @@
|
|
|
1
|
-
auth/
|
|
2
|
-
==============
|
|
1
|
+
# auth/auth_ldap
|
|
3
2
|
|
|
4
3
|
The `auth/auth_ldap` plugin uses an LDAP bind to authenticate a user. Currently
|
|
5
|
-
only one server and multiple DNs can be configured. If any of the DN binds succeed,
|
|
6
|
-
the user is authenticated.
|
|
4
|
+
only one server and multiple DNs can be configured. If any of the DN binds succeed,
|
|
5
|
+
the user is authenticated.
|
|
7
6
|
|
|
8
|
-
Configuration
|
|
9
|
-
-------------
|
|
7
|
+
## Configuration
|
|
10
8
|
|
|
11
9
|
Configuration is stored in `config/auth_ldap.ini` and uses the INI
|
|
12
|
-
style formatting.
|
|
10
|
+
style formatting.
|
|
13
11
|
|
|
14
12
|
Only the `LOGIN` authentication method is supported assuming that passwords in the
|
|
15
13
|
LDAP database are not stored in cleartext (which would allow for CRAM-MD5). Note
|
|
16
14
|
that this means passwords will be sent in the clear to the LDAP server unless
|
|
17
|
-
an `ldaps://` conection is used.
|
|
15
|
+
an `ldaps://` conection is used.
|
|
18
16
|
|
|
19
17
|
Current configuration options in `[core]` are:
|
|
20
18
|
|
|
21
19
|
server - the url of the LDAP server (ldap:// or ldaps://)
|
|
22
20
|
timeout - time in miliseconds to wait for the server resonse before giving up
|
|
23
21
|
rejectUnauthorized - boolean (true or false) as to whether to reject connections
|
|
24
|
-
not verified against a CA. Meaning, a "false" allows non-verified.
|
|
22
|
+
not verified against a CA. Meaning, a "false" allows non-verified.
|
|
25
23
|
|
|
26
24
|
Example:
|
|
27
25
|
|
|
28
26
|
[core]
|
|
29
27
|
server=ldaps://ldap.opoet.com
|
|
30
28
|
timeout=5000
|
|
31
|
-
rejectUnauthorized=false
|
|
29
|
+
rejectUnauthorized=false
|
|
32
30
|
|
|
33
31
|
The `[dns]` section (that is plural DN and not domain name system), is a list of DNs to use
|
|
34
|
-
to bind. The `%u` in the strings is substituted with the user name used in the SMTP
|
|
32
|
+
to bind. The `%u` in the strings is substituted with the user name used in the SMTP
|
|
35
33
|
authentication. Note that the keys have no meaning and the DNs are tried in series until
|
|
36
34
|
the first successful bind. The LDAP RFC does not allow for parallel binds on a connection,
|
|
37
|
-
so it is suggested that the most commonly used DN be placed earlier in the list.
|
|
35
|
+
so it is suggested that the most commonly used DN be placed earlier in the list.
|
|
38
36
|
|
|
39
37
|
Example:
|
|
40
38
|
|
|
41
39
|
[dns]
|
|
42
40
|
dn1=uid=%u,ou=Users,dc=opoet,dc=com
|
|
43
|
-
dn2=uid=%u,ou=people,dc=opoet,dc=com
|
|
44
|
-
|
|
41
|
+
dn2=uid=%u,ou=people,dc=opoet,dc=com
|
|
@@ -1,29 +1,27 @@
|
|
|
1
|
-
auth/
|
|
2
|
-
===============
|
|
1
|
+
# auth/auth_proxy
|
|
3
2
|
|
|
4
3
|
This plugin allows you to authenticate users by domain to remote SMTP servers
|
|
5
4
|
and proxy the result back to authenticate the client.
|
|
6
5
|
|
|
7
|
-
For this to work - the AUTH username
|
|
6
|
+
For this to work - the AUTH username _must_ be in user@domain.com format
|
|
8
7
|
regardless as to whether the remote SMTP server requires it in this format.
|
|
9
|
-
The domain part of the username is used to look-up which SMTP servers should
|
|
8
|
+
The domain part of the username is used to look-up which SMTP servers should
|
|
10
9
|
be used to authenticate users for that domain.
|
|
11
10
|
When sending the AUTH credentials to the remote server, this plugin will try
|
|
12
|
-
and send the full username e.g. user@domain.com first and if this fails it
|
|
11
|
+
and send the full username e.g. user@domain.com first and if this fails it
|
|
13
12
|
will then strip the @domain.com part and just send the unqualified username.
|
|
14
13
|
|
|
15
14
|
Due to the way this plugin works - it can only support PLAIN and LOGIN
|
|
16
15
|
authentication methods and for this reason it requires that STARTTLS be
|
|
17
16
|
used via the tls plugin before it will advertise AUTH capabilities by the
|
|
18
|
-
EHLO command.
|
|
19
|
-
attempt STARTTLS if it is offered, but it does
|
|
17
|
+
EHLO command. When connecting to the remote SMTP systems it will always
|
|
18
|
+
attempt STARTTLS if it is offered, but it does _not_ require it, so caution
|
|
20
19
|
should be exercised.
|
|
21
20
|
|
|
22
|
-
Configuration
|
|
23
|
-
-------------
|
|
21
|
+
## Configuration
|
|
24
22
|
|
|
25
23
|
Configuration is stored in `config/auth_proxy.ini` and uses the INI
|
|
26
|
-
style formatting.
|
|
24
|
+
style formatting.
|
|
27
25
|
|
|
28
26
|
The configuration of this plugin is simple:
|
|
29
27
|
|
|
@@ -31,8 +29,8 @@ The configuration of this plugin is simple:
|
|
|
31
29
|
domain.com = server1.domain.com:587 server2.domain.com
|
|
32
30
|
|
|
33
31
|
Where domain.com is the domain-part of the username equals a list of hosts
|
|
34
|
-
that should be consulted in host:port format.
|
|
35
|
-
default to 25.
|
|
32
|
+
that should be consulted in host:port format. The :port is optional and will
|
|
33
|
+
default to 25. The list of hosts can be space, semi-colon or comma separated.
|
|
36
34
|
|
|
37
35
|
If more than host is specified, then subsequent hosts will only be tested if
|
|
38
36
|
there is some sort of error e.g. timeout, connection or protocol error.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# auth/
|
|
1
|
+
# auth/auth_vpopmaild
|
|
2
2
|
|
|
3
3
|
The `auth/vpopmaild` plugin allows SMTP users to authenticate against a vpopmaild daemon.
|
|
4
4
|
|
|
@@ -8,14 +8,13 @@ The configuration file is stored in `config/auth_vpopmaild.ini`.
|
|
|
8
8
|
|
|
9
9
|
### settings
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
- host: The host/IP that vpopmaild is listening on (default: localhost).
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
- port: The TCP port that vpopmaild is listening on (default: 89).
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
* constrain_sender: (default: true). For outbound messages (due to successful AUTH), constrain the envelope sender (MAIL FROM) to the same domain as the authenticated user. This setting, combined with `rate_rcpt_sender` in the [limit](https://github.com/haraka/haraka-plugin-limit) plugin can dramatically reduce the amount of backscatter and spam sent when an email account is compromised.
|
|
15
|
+
- sysadmin: A colon separated username:password of a vpopmail user with SYSADMIN privileges (see vpopmail/bin/vmoduser -S). This is **only** necessary to support CRAM-MD5 which requires access to the clear text password. On new installs, it's best not to use CRAM-MD5, as it requires storing clear text passwords. Legacy clients with MUAs configured to authenticate with CRAM-MD5 will need this enabled.
|
|
18
16
|
|
|
17
|
+
- constrain_sender: (default: true). For outbound messages (due to successful AUTH), constrain the envelope sender (MAIL FROM) to the same domain as the authenticated user. This setting, combined with `rate_rcpt_sender` in the [limit](https://github.com/haraka/haraka-plugin-limit) plugin can dramatically reduce the amount of backscatter and spam sent when an email account is compromised.
|
|
19
18
|
|
|
20
19
|
### Per-domain Configuration
|
|
21
20
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# auth/
|
|
1
|
+
# auth/flat_file
|
|
2
2
|
|
|
3
3
|
The `auth/flat_file` plugin allows you to create a file containing username and password combinations, and have relaying users authenticate from that file.
|
|
4
4
|
|
|
@@ -6,18 +6,18 @@ Note that passwords are stored in clear-text, so this may not be a great idea fo
|
|
|
6
6
|
|
|
7
7
|
**Security** - it is recommended to switch to [auth-encfile][url-authencflat] to protect your user credentials.
|
|
8
8
|
|
|
9
|
-
**IMPORANT NOTE** - this plugin requires that STARTTLS be used via the tls plugin before it will advertise AUTH capabilities by the EHLO command.
|
|
9
|
+
**IMPORANT NOTE** - this plugin requires that STARTTLS be used via the tls plugin before it will advertise AUTH capabilities by the EHLO command. Localhost and IPs in RFC1918 ranges
|
|
10
10
|
are exempt from this rule.
|
|
11
11
|
|
|
12
12
|
## Configuration
|
|
13
13
|
|
|
14
14
|
Configuration is stored in `config/auth_flat_file.ini`.
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
- [core]methods
|
|
17
17
|
|
|
18
18
|
Authentication methods are listed in the `[core]methods` parameter. Authentification methods are comma separated. Currently supported methods are: `CRAM-MD5`, `PLAIN` and `LOGIN`. The `PLAIN` and `LOGIN` methods are insecure and require TLS to be enabled.
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
- [core]constrain_sender: (default: true). For outbound messages (due to successful AUTH), constrain the envelope sender (MAIL FROM) to the same domain as the authenticated user. This setting, combined with `rate_rcpt_sender` in the [limit](https://github.com/haraka/haraka-plugin-limit) plugin can dramatically reduce the amount of backscatter and spam sent when an email account is compromised.
|
|
21
21
|
|
|
22
22
|
Example:
|
|
23
23
|
|
package/docs/plugins/block_me.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
#
|
|
1
|
+
# block_me
|
|
2
2
|
|
|
3
3
|
This plugin allows you to configure an address which mail sent to will be
|
|
4
4
|
parsed for a From: address in the body of the message, and will add that
|
|
@@ -11,8 +11,8 @@ Note that this is a system-wide block, and not per-user. Be careful with this.
|
|
|
11
11
|
|
|
12
12
|
## Configuration
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
- `config/block_me.recipient` - a file containing the address to email to
|
|
15
15
|
get something blocked. For example: **spam@domain.com**.
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
- `config/block_me.senders` - a file containing a list of email addresses
|
|
18
18
|
that are allowed to email the dropbox.
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
#
|
|
1
|
+
# delay_deny
|
|
2
2
|
|
|
3
3
|
Delays all pre-DATA 'deny' results until the recipients are sent
|
|
4
|
-
and all post-DATA commands until all
|
|
4
|
+
and all post-DATA commands until all hook_data_post plugins have run.
|
|
5
5
|
This allows relays and authenticated users to bypass pre-DATA rejections.
|
|
6
6
|
|
|
7
7
|
## Configuration
|
|
8
8
|
|
|
9
|
-
Configuration options are in config/
|
|
9
|
+
Configuration options are in config/delay_deny.ini.
|
|
10
10
|
|
|
11
11
|
This plugin operates in one of two modes: included and excluded.
|
|
12
12
|
|
|
@@ -21,4 +21,3 @@ can immediately reject connections.
|
|
|
21
21
|
A comma or semicolon separated list of denials that are to be excluded.
|
|
22
22
|
Excluded plugins that are not bypassed and can still immediately reject
|
|
23
23
|
connections.
|
|
24
|
-
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
#
|
|
1
|
+
# max_unrecognized_commands
|
|
2
2
|
|
|
3
3
|
This plugin places a maximum limit on the number of unrecognized commands
|
|
4
4
|
allowed before recognising that the connection is bad.
|
|
@@ -6,15 +6,15 @@ allowed before recognising that the connection is bad.
|
|
|
6
6
|
If the limit is reached the connecting client is sent an error message and
|
|
7
7
|
immediately (and rudely - technically an RFC violation) disconnected.
|
|
8
8
|
|
|
9
|
-
**IMPORTANT**:
|
|
9
|
+
**IMPORTANT**:
|
|
10
10
|
This plugin should be listed near the bottom of `config/plugins` so that it
|
|
11
11
|
runs after any plugins that use the unrecognized_command hook to implement
|
|
12
|
-
other SMTP verbs and extensions (such as the auth
|
|
12
|
+
other SMTP verbs and extensions (such as the auth/\* plugins), otherwise
|
|
13
13
|
commands valid for these plugins will be counted as unknown by this plugin.
|
|
14
14
|
|
|
15
15
|
## Configuration
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
- max_unrecognized_commands
|
|
18
18
|
|
|
19
19
|
Specifies the number of unrecognized commands to allow before disconnecting.
|
|
20
20
|
Default: 10.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
#
|
|
1
|
+
# prevent_credential_leaks
|
|
2
2
|
|
|
3
3
|
This plugin prevents an authenticated user (via SMTP AUTH) from sending
|
|
4
4
|
their username and password out in a message (e.g. like replying to a
|
|
@@ -7,16 +7,16 @@ phish).
|
|
|
7
7
|
If their username and password are detected inside the message body, then
|
|
8
8
|
the message is rejected with the message:
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
```
|
|
11
11
|
Credential leak detected: never give out your username/password to anyone!
|
|
12
|
-
|
|
12
|
+
```
|
|
13
13
|
|
|
14
14
|
Note that if the username is qualified e.g. user@domain.com - then the
|
|
15
|
-
plugin will search for both `user` and `user@domain.com` for maximum
|
|
15
|
+
plugin will search for both `user` and `user@domain.com` for maximum
|
|
16
16
|
effectiveness.
|
|
17
17
|
|
|
18
18
|
## Configuration
|
|
19
19
|
|
|
20
|
-
No configuration is required.
|
|
21
|
-
file.
|
|
20
|
+
No configuration is required. Simply add the plugin to your `config/plugins`
|
|
21
|
+
file. It should be added before any other plugins that run on hook_data_post
|
|
22
22
|
for maximum efficiency.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
#
|
|
1
|
+
# process_title
|
|
2
2
|
|
|
3
3
|
This plugin causes the process title seen by the UNIX 'ps' command to
|
|
4
4
|
be modified from this:
|
|
@@ -10,31 +10,31 @@ node haraka.js -c /etc/haraka
|
|
|
10
10
|
to this:
|
|
11
11
|
|
|
12
12
|
```
|
|
13
|
-
Haraka (master) cn=11148 cc=1082 cps=21/25.24/79 rcpts=144950/1.84 rps=518/328.18/586 msgs=78815/7.07 mps=302/178.44/329 out=0/0/0 respawn=0
|
|
14
|
-
\_ Haraka (worker) cn=1646 cc=140 cps=5/3.73/17 rcpts=20310/1.86 rps=75/46.04/102 msgs=10938/6.65 mps=42/24.8/56 out=0/0/0
|
|
15
|
-
\_ Haraka (worker) cn=1563 cc=168 cps=3/3.54/18 rcpts=19844/1.87 rps=78/45/96 msgs=10627/6.8 mps=49/24.1/53 out=0/0/0
|
|
16
|
-
\_ Haraka (worker) cn=1852 cc=172 cps=3/4.2/16 rcpts=26278/2.03 rps=93/59.56/114 msgs=12938/6.99 mps=40/29.33/65 out=0/0/0
|
|
17
|
-
\_ Haraka (worker) cn=1704 cc=187 cps=5/3.86/14 rcpts=23688/1.84 rps=93/53.7/125 msgs=12886/7.56 mps=64/29.21/66 out=0/0/0
|
|
18
|
-
\_ Haraka (worker) cn=2296 cc=218 cps=2/5.2/20 rcpts=29300/1.78 rps=117/66.4/125 msgs=16489/7.18 mps=40/37.37/66 out=0/0/0
|
|
19
|
-
\_ Haraka (worker) cn=2091 cc=195 cps=4/4.74/16 rcpts=25646/1.71 rps=84/58.12/117 msgs=14982/7.16 mps=52/33.95/66 out=0/0/0
|
|
13
|
+
Haraka (master) cn=11148 cc=1082 cps=21/25.24/79 rcpts=144950/1.84 rps=518/328.18/586 msgs=78815/7.07 mps=302/178.44/329 out=0/0/0 respawn=0
|
|
14
|
+
\_ Haraka (worker) cn=1646 cc=140 cps=5/3.73/17 rcpts=20310/1.86 rps=75/46.04/102 msgs=10938/6.65 mps=42/24.8/56 out=0/0/0
|
|
15
|
+
\_ Haraka (worker) cn=1563 cc=168 cps=3/3.54/18 rcpts=19844/1.87 rps=78/45/96 msgs=10627/6.8 mps=49/24.1/53 out=0/0/0
|
|
16
|
+
\_ Haraka (worker) cn=1852 cc=172 cps=3/4.2/16 rcpts=26278/2.03 rps=93/59.56/114 msgs=12938/6.99 mps=40/29.33/65 out=0/0/0
|
|
17
|
+
\_ Haraka (worker) cn=1704 cc=187 cps=5/3.86/14 rcpts=23688/1.84 rps=93/53.7/125 msgs=12886/7.56 mps=64/29.21/66 out=0/0/0
|
|
18
|
+
\_ Haraka (worker) cn=2296 cc=218 cps=2/5.2/20 rcpts=29300/1.78 rps=117/66.4/125 msgs=16489/7.18 mps=40/37.37/66 out=0/0/0
|
|
19
|
+
\_ Haraka (worker) cn=2091 cc=195 cps=4/4.74/16 rcpts=25646/1.71 rps=84/58.12/117 msgs=14982/7.16 mps=52/33.95/66 out=0/0/0
|
|
20
20
|
```
|
|
21
21
|
|
|
22
22
|
where:
|
|
23
23
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
24
|
+
- cn = Total number of connections
|
|
25
|
+
- cc = Total number of concurrent connections
|
|
26
|
+
- cps = Number of connections in the last second / average / maximum
|
|
27
|
+
- rcpts = Total number of recipients / Average number of recipients per message
|
|
28
|
+
- rps = Number of recipients in the last second / average / maximum
|
|
29
|
+
- msgs = Total number of messages / Average number messages per connection
|
|
30
|
+
- mps = Number of messages in the last second / average / maximum
|
|
31
|
+
- out = Mails being processed / Mails waiting to be processed / Mails in temp fail state
|
|
32
|
+
- respawn = Number of worker processes respawned (only under cluster)
|
|
33
33
|
|
|
34
34
|
If 'cluster' is used then the master process will show the total
|
|
35
35
|
across all workers, with the exception of outbound stats.
|
|
36
36
|
|
|
37
|
-
All of the counts shown are since the process started, so if a
|
|
37
|
+
All of the counts shown are since the process started, so if a
|
|
38
38
|
worker has been re-started then the counts may not add up.
|
|
39
39
|
|
|
40
40
|
Note: this plugin will only work on node >= 0.8 and should be
|
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
This plugin will discard a message by pretending that the message was queued.
|
|
4
4
|
|
|
5
|
-
It is designed to be used by other plugins which request the message be
|
|
5
|
+
It is designed to be used by other plugins which request the message be
|
|
6
6
|
discard by setting a connection or transaction note that this plugin
|
|
7
7
|
checks.
|
|
8
8
|
|
|
9
9
|
It uses the 'queue' hook, so it runs after all the plugins that hook on `data_post`.
|
|
10
10
|
|
|
11
|
-
If you use the 'quarantine' plug-in then this plugin should run
|
|
11
|
+
If you use the 'quarantine' plug-in then this plugin should run _after_ it.
|
|
12
12
|
|
|
13
13
|
USE THIS PLUGIN WITH CARE!
|
|
14
14
|
|
|
@@ -22,11 +22,11 @@ other queue plugins that perform actual deliveries.
|
|
|
22
22
|
Set
|
|
23
23
|
|
|
24
24
|
```javascript
|
|
25
|
-
connection.notes.discard = [
|
|
25
|
+
connection.notes.discard = [1 | true]
|
|
26
26
|
```
|
|
27
27
|
|
|
28
28
|
or
|
|
29
29
|
|
|
30
30
|
```javascript
|
|
31
|
-
connection.transaction.notes.discard = [
|
|
31
|
+
connection.transaction.notes.discard = [1 | true]
|
|
32
32
|
```
|